A Challenging Craft
Customer
Fabian
My day to day job is to help customersfixing software performance
People really struggle with performance
But most of them struggle with coding as well
That‘s me
If creating good software is a craft,performance should be one as well
Art
Some say:„creating software is art“
Art and software developmentneed creativity
Magic
Fixing performance isoften considered magic
Magic is something only you understand
you do in a hard tofollow fashion
Craft
Correctness in detail
Research and verification
Which way?
All types share Passion
Learning
Experience
Money
(in parts of the world)
Value == Money
We need a business casefor performance
What is the impact ofbad performance?
Typical (?) retailer
Amazon measured theimpact of 100ms delay
Sales dropped by 1%
In a year that would be245 Million USD
New?
Instable or slow softwaredelays time to market
Slow software is no longeraccepted by customers
Snail Mail
Insurances like to sendpaper via mail
Not meeting deadlines cancause Legal issues
Canceled contracts
Loss of money
Is A Craft
Performance
Engineering
Calculate Execution Time Code x = 5ms
Code y = 2*x = 10ms
Know code in advance
Waterfall approach
Proving the performance of softwareis more difficult than proving the correct function
Look closely
We prove functionalcorrectness with automatedtests
High coverage
Run examples and see if they are fast
How much load
breaks the system?
Done late in project
If done at all
No chance to fix anything
42cm are fast?
Avoid human errors
Require machine decidablefail / pass check
What is the measure?
Our Environment
Functionality is independentof the environment
Performance characteristicscan vary Unusable slow
Lightning fast
Developers
driving fast
Underpowered hardware
Loaded with toolsand stuff
Luckily not the productionenvironment
Crawling Production
More power
But also more load
How much faster isproduction than development?
Any estimation on how much better or worse theenvironments are is incorrect
Stop playing
Real performance testsneed real systems
Test in production
Clone productioninfrastructure
Tweets per second
Amount of data isunpredictable
Application usage isunpredictable
How thought of using Twitter for build notification?
Dev
Test Test1
Test Test2
Test Test3
Showing 3/3
Fabian Lange
Uwe Friedrichsen
Mirko Novakovic
Showing 3/6,434,867
Prod
Load Baselines
Syntethic load tests areunrealistic
No application has hundredsof users doing the sameprocedure again and again
Understanding real load is difficult
Live Systems are live
Real usage cannotbe generated
Real usage can becaptured & replayed
Be careful
App Monitor
Continous performance tests
Close to real setup
Observe production behavior
Fix issues fast
Another Movement
Conflicting interests Development: Change
Operations: Stability
Need to work together
Is A Challenge
Let users test?
Can‘t we do anything beforeproduction?
We want to deliver something,which works perfectly!
Missed Target
Optimizations might haveno impact
Micro-Optimizations aredangerous
Sonar
Soft Measure
Works good for code quality
Are there performance best practices?
Good Waterfalls
Yahoo Best Practices
Google Best Practices
Plenty of tools
Work well
Naive implementation looks fine
But is not multithreaded
This is threadsafe
But slow
This is correct
Correct synchronisation is hard
Check Log Level (Ugly)
Check Log Level (Nicer)
Static SimpleDateFormat is wrong
Working with Datesand Calendars isvery expensive!
Some people misuse it as loop
Results are unexpected behavior or slow execution
Indeed finds bugs
Analyzes Java Bytecode
Knows 58 Performance Bugs
Most are rather trivial
Verifies Java
Detecting deadlocksis difficult
Many thesis's on deadlockdetection
Few code
IBM
Support Assistant
Hidden Gem
Tries to cause Deadlocks
We need more and reliable Code Performance Metrics
Best Practices
Tools
Is A Challenging Craft
Q & A
Art flickr.com/photos/37202375@N03/3490107873
Magicflickr.com/photos/princes_milady/4238912548
Crossroadsflickr.com/photos/40481200@N06/4857965280
Envelopesflickr.com/photos/creatingmotherhood/3663914542
Testflickr.com/photos/cayusa/2159980025
Scalesflickr.com/photos/reinvented/309512320
Tape Measureflickr.com/photos/hippie/2466583497
World flickr.com/photos/heimdahlrecounts/4346082743
Toysflickr.com/photos/sbluerock/364123380
TPSflickr.com/photos/twitteroffice/5681263084
Bananasflickr.com/photos/design-dog/1249337589
Dartflickr.com/photos/malavoda/2369876508
YSlowdeveloper.yahoo.com/yslow
Pagespeedcode.google.com/speed/page-speed
Java Lockingen.wikipedia.org/wiki/Double-checked_locking
PHP Ternary Operatorfabien.potencier.org/article/48/the-php-ternary-operator-fast-or-not
JavaScript for .. Instackoverflow.com/questions/500504/javascript-for-in-with-arrays
Findbugsfindbugs.sourceforge.net
Jlintjlint.sourceforge.net
IBM Multicore SDKwww-01.ibm.com/support/docview.wss?uid=swg21456945
Top Related