HighPerformance PHPPHPDay 2013Jonathan Klein@jonathankleinSaturday, May 18, 13
Slides, Links:jkle.in/phpdaySaturday, May 18, 13
Some Etsy Stats• 1.4 billion page views/month• Almost $1B in sales last year• Over 1M lines of PHPSaturday, May 18, 13
Agenda• Why Performance Matters• Profiling PHP Applications• Code Level Optimizations• Big Wins• Load Testing• TakeawaysSa...
The Value ofPerformanceSaturday, May 18, 13
Saturday, May 18, 13
Real World Exampleshttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
Real World Examples• Firefox: -2.2 seconds = 15.4% more downloadshttp://www.phpied.com/the-performance-business-pitch/Satu...
Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenuehttp://...
Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenue• Googl...
Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenue• Googl...
~80% of pageload time takesplace on the clientSaturday, May 18, 13
...if your backendis fastSaturday, May 18, 13
A fast page load is 2 secondsThis means you have 400ms to get thatHTML off your serverSaturday, May 18, 13
But network time could be ~100msThis means you have 400ms 300ms tobuild the pageSaturday, May 18, 13
< 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionhttp://www.nngroup.com/articles/response-time...
< 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 Secondshttp://www.nngroup....
< 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 SecondsBase HTML – 400msht...
< 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 SecondsBase HTML – 400msSe...
Profiling PHPApplicationsSaturday, May 18, 13
Monitoring/Tracing• Paid:• Tracelytics (bought by AppNeta)• AppDynamics (building a PHP solution)• dynaTrace (building a P...
Monitoring/Tracing• Paid:• Tracelytics (bought by AppNeta)• AppDynamics (building a PHP solution)• dynaTrace (building a P...
StatsD (UDP packets)$start = microtime(true);/* script content */$end = microtime(true);StatsD::timing(foo.bar, $end - $st...
Graphite• Written by Orbitz• Real-time graphing engine for StatsD data(among other things)• http://graphite.wikidot.com/• ...
Etsy Conversations PHP TimeExecution CountSaturday, May 18, 13
Search Page PHP Time (95th Percentile)Saturday, May 18, 13
Search PageExecution CountSaturday, May 18, 13
Stacked Search TimersSaturday, May 18, 13
xhprof• PHP Extension (need to install)• http://pecl.php.net/package/xhprof• Code level tracing• Significant overhead, use...
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Lesson:Profile Your CodeSaturday, May 18, 13
Code LevelOptimizationsSaturday, May 18, 13
Writing Efficient PHPSet max value before loop:$max = count($rows);for ($i = 0; $i < $max; $i++) {echo $i;}require_once() ...
Almost Every Micro-Optimization isWorthlessSaturday, May 18, 13
http://phpbench.com/Saturday, May 18, 13
http://phpbench.com/Saturday, May 18, 13
http://phpbench.com/Saturday, May 18, 13
Writing Efficient PHPSet max value before loop:$max = count($rows);for ($i = 0; $i < $max; $i++) {echo $i;}Okay, this one ...
Saturday, May 18, 13
Saturday, May 18, 13
So Why Even MentionMicro-Optimizations?Saturday, May 18, 13
http://code.flickr.net/2009/12/02/flipping-out/Saturday, May 18, 13
strtok() to implode()Saturday, May 18, 13
Lesson:Focus on the BigWinsSaturday, May 18, 13
“Premature optimization is the root of all evil”- Donald KnuthSaturday, May 18, 13
Big WinsSaturday, May 18, 13
Upgrade PHPSaturday, May 18, 13
Upgrade PHP5.3 is ~20% faster than 5.2Saturday, May 18, 13
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/36484Saturday, May 18, 13
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/36484Saturday, May 18, 13
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3Saturday, May 1...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php...
PHP 5.4 is 5 Times Faster than PHP 4http://static.zend.com/topics/White-paper-PHP4-PHP5.pdfSaturday, May 18, 13
Etsy’s Upgrade to PHP 5.4Saturday, May 18, 13
Use an OpcodeCache (APC)Saturday, May 18, 13
Standard Page ExecutionSaturday, May 18, 13
With An Opcode CacheSaturday, May 18, 13
Opcode CacheVanilla settings: 30-40% improvementTurn off APC Stat: additional ~2ximprovement-- Understand what is happenin...
Cache Data in aKey-Value StoreSaturday, May 18, 13
APC User Cache<?php$foo = "Hello, World!";apc_store(some_key, $foo);?><?phpvar_dump(apc_fetch(some_key));?>-------- Output...
APC User CacheSaturday, May 18, 13
APC User Cache• Avoid fragmentation - keep utilization under 10%Saturday, May 18, 13
APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MBSaturday, May 18, 13
APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are >...
APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are >...
APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are >...
APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are >...
Memcached• Usually a separate server• In-memory key-value store• Extremely simple and fast• http://memcached.org/Saturday,...
APC vs. MemcachedAPC User Cache MemcachedLocal to the Server Shared Network ResourceGood for small objects Large or small ...
Fix All Errors• PHP 5.3: E_ALL | E_STRICT• PHP 5.4: E_ALL• Can also do error_reporting(-1);Saturday, May 18, 13
Child Processes4-6 processes per CPU core.Beyond that just add servers.(Test your app)Saturday, May 18, 13
HipHop for PHP• Developed/Open Sourced by Facebook• Now a VM + JIT compilation• 5x improvement in throughput over PHP 5.2•...
UnderstandFrameworkOverheadSaturday, May 18, 13
http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Symfony is 20xslower than rawPHPSaturday, May 18, 13
Load TestingSaturday, May 18, 13
JMeter• Open Source• Generate load via a GUI or commandline• Can watch req/s degrade with moreusers• Easy to useSaturday, ...
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Saturday, May 18, 13
Be CarefulSaturday, May 18, 13
Be Careful• JMeter looks a lot like a DOS attackSaturday, May 18, 13
Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failingSaturday, May 18, 13
Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is run...
Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is run...
Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is run...
TakeawaysSaturday, May 18, 13
“How Fast IsYour Site?”Saturday, May 18, 13
This is a terrible quesitonSaturday, May 18, 13
Why is it terrible?Saturday, May 18, 13
Why is it terrible?• Lack of contextSaturday, May 18, 13
Why is it terrible?• Lack of context• Are we talking about average or a percentile?Saturday, May 18, 13
Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?Saturday, ...
Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is m...
Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is m...
Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is m...
We still have to answer itSaturday, May 18, 13
Pick Tight SLAs“The homepage of our site will load in<300ms at the 80th percentile, measuredby sampling 10% of our real us...
Pick Tight SLAs“The homepage of our site will load in<300ms at the 80th percentile, measuredby sampling 10% of our real us...
Things to RememberSaturday, May 18, 13
Things to Remember• Measure and monitor your applicationSaturday, May 18, 13
Things to Remember• Measure and monitor your application• Focus on big winsSaturday, May 18, 13
Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHPSaturda...
Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make ...
Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make ...
Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make ...
Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make ...
There is a lot more to talk aboutSaturday, May 18, 13
Get in Touchhttp://web-performance.meetup.com/www.etsy.com/careersjonathan@etsy.com@jonathankleinSaturday, May 18, 13
Upcoming SlideShare
Loading in...5
×

PHPDay 2013 - High Performance PHP

9,363

Published on

This is a talk that I gave in Verona, Italy at PHPDay 2013 on May 18th.

Published in: Technology
0 Comments
18 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,363
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
95
Comments
0
Likes
18
Embeds 0
No embeds

No notes for slide
  • Not a general improvement - test YOUR site
  • Halfway through, SLOW DOWN!
  • Talk about how APC is local to the machine
  • HipHop VM has made development easier
  • PHPDay 2013 - High Performance PHP

    1. 1. HighPerformance PHPPHPDay 2013Jonathan Klein@jonathankleinSaturday, May 18, 13
    2. 2. Slides, Links:jkle.in/phpdaySaturday, May 18, 13
    3. 3. Some Etsy Stats• 1.4 billion page views/month• Almost $1B in sales last year• Over 1M lines of PHPSaturday, May 18, 13
    4. 4. Agenda• Why Performance Matters• Profiling PHP Applications• Code Level Optimizations• Big Wins• Load Testing• TakeawaysSaturday, May 18, 13
    5. 5. The Value ofPerformanceSaturday, May 18, 13
    6. 6. Saturday, May 18, 13
    7. 7. Real World Exampleshttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
    8. 8. Real World Examples• Firefox: -2.2 seconds = 15.4% more downloadshttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
    9. 9. Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenuehttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
    10. 10. Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenue• Google: +400ms = 0.76% fewer searcheshttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
    11. 11. Real World Examples• Firefox: -2.2 seconds = 15.4% more downloads• Shopzilla: -5 seconds = 7-12% increase inrevenue• Google: +400ms = 0.76% fewer searches• Amazon: +100ms = -1% revenuehttp://www.phpied.com/the-performance-business-pitch/Saturday, May 18, 13
    12. 12. ~80% of pageload time takesplace on the clientSaturday, May 18, 13
    13. 13. ...if your backendis fastSaturday, May 18, 13
    14. 14. A fast page load is 2 secondsThis means you have 400ms to get thatHTML off your serverSaturday, May 18, 13
    15. 15. But network time could be ~100msThis means you have 400ms 300ms tobuild the pageSaturday, May 18, 13
    16. 16. < 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionhttp://www.nngroup.com/articles/response-times-3-important-limits/Saturday, May 18, 13
    17. 17. < 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 Secondshttp://www.nngroup.com/articles/response-times-3-important-limits/Saturday, May 18, 13
    18. 18. < 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 SecondsBase HTML – 400mshttp://www.nngroup.com/articles/response-times-3-important-limits/Saturday, May 18, 13
    19. 19. < 100ms feels instant< 1 sec feels like flow< 10 sec to keep user’s attentionFull Page Load – 2 SecondsBase HTML – 400msServer Generation Time – 300mshttp://www.nngroup.com/articles/response-times-3-important-limits/Saturday, May 18, 13
    20. 20. Profiling PHPApplicationsSaturday, May 18, 13
    21. 21. Monitoring/Tracing• Paid:• Tracelytics (bought by AppNeta)• AppDynamics (building a PHP solution)• dynaTrace (building a PHP solution)• New Relic (has a free option)• Free:• StatsD/Graphite• xhprofSaturday, May 18, 13
    22. 22. Monitoring/Tracing• Paid:• Tracelytics (bought by AppNeta)• AppDynamics (building a PHP solution)• dynaTrace (building a PHP solution)• New Relic• Free:• StatsD/Graphite• xhprofSaturday, May 18, 13
    23. 23. StatsD (UDP packets)$start = microtime(true);/* script content */$end = microtime(true);StatsD::timing(foo.bar, $end - $start);More Info: http://goo.gl/LbDPESaturday, May 18, 13
    24. 24. Graphite• Written by Orbitz• Real-time graphing engine for StatsD data(among other things)• http://graphite.wikidot.com/• Architecture: http://www.aosabook.org/en/graphite.htmlSaturday, May 18, 13
    25. 25. Etsy Conversations PHP TimeExecution CountSaturday, May 18, 13
    26. 26. Search Page PHP Time (95th Percentile)Saturday, May 18, 13
    27. 27. Search PageExecution CountSaturday, May 18, 13
    28. 28. Stacked Search TimersSaturday, May 18, 13
    29. 29. xhprof• PHP Extension (need to install)• http://pecl.php.net/package/xhprof• Code level tracing• Significant overhead, use in DEV only!• Add ?xhprof=1 to URL• Results in browserSaturday, May 18, 13
    30. 30. Saturday, May 18, 13
    31. 31. Saturday, May 18, 13
    32. 32. Saturday, May 18, 13
    33. 33. Saturday, May 18, 13
    34. 34. Saturday, May 18, 13
    35. 35. Lesson:Profile Your CodeSaturday, May 18, 13
    36. 36. Code LevelOptimizationsSaturday, May 18, 13
    37. 37. Writing Efficient PHPSet max value before loop:$max = count($rows);for ($i = 0; $i < $max; $i++) {echo $i;}require_once() is slowMinimize use of define()Yes, single quotes are slightly faster than double quotes, but...Saturday, May 18, 13
    38. 38. Almost Every Micro-Optimization isWorthlessSaturday, May 18, 13
    39. 39. http://phpbench.com/Saturday, May 18, 13
    40. 40. http://phpbench.com/Saturday, May 18, 13
    41. 41. http://phpbench.com/Saturday, May 18, 13
    42. 42. Writing Efficient PHPSet max value before loop:$max = count($rows);for ($i = 0; $i < $max; $i++) {echo $i;}Okay, this one is pretty goodSaturday, May 18, 13
    43. 43. Saturday, May 18, 13
    44. 44. Saturday, May 18, 13
    45. 45. So Why Even MentionMicro-Optimizations?Saturday, May 18, 13
    46. 46. http://code.flickr.net/2009/12/02/flipping-out/Saturday, May 18, 13
    47. 47. strtok() to implode()Saturday, May 18, 13
    48. 48. Lesson:Focus on the BigWinsSaturday, May 18, 13
    49. 49. “Premature optimization is the root of all evil”- Donald KnuthSaturday, May 18, 13
    50. 50. Big WinsSaturday, May 18, 13
    51. 51. Upgrade PHPSaturday, May 18, 13
    52. 52. Upgrade PHP5.3 is ~20% faster than 5.2Saturday, May 18, 13
    53. 53. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/36484Saturday, May 18, 13
    54. 54. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/36484Saturday, May 18, 13
    55. 55. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3Saturday, May 18, 13
    56. 56. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Saturday, May 18, 13
    57. 57. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Saturday, May 18, 13
    58. 58. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Upgrading 5.2 --> 5.4 gives a 45-70% improvement!Saturday, May 18, 13
    59. 59. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Upgrading 5.2 --> 5.4 gives a 45-70% improvement!http://php.net/migration53Saturday, May 18, 13
    60. 60. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Upgrading 5.2 --> 5.4 gives a 45-70% improvement!http://php.net/migration53http://php.net/migration54Saturday, May 18, 13
    61. 61. Upgrade PHP5.3 is ~20% faster than 5.2http://news.php.net/php.internals/364845.4 is ~20-40% faster than 5.3http://news.php.net/php.internals/57760Upgrading 5.2 --> 5.4 gives a 45-70% improvement!http://php.net/migration53http://php.net/migration54Saturday, May 18, 13
    62. 62. PHP 5.4 is 5 Times Faster than PHP 4http://static.zend.com/topics/White-paper-PHP4-PHP5.pdfSaturday, May 18, 13
    63. 63. Etsy’s Upgrade to PHP 5.4Saturday, May 18, 13
    64. 64. Use an OpcodeCache (APC)Saturday, May 18, 13
    65. 65. Standard Page ExecutionSaturday, May 18, 13
    66. 66. With An Opcode CacheSaturday, May 18, 13
    67. 67. Opcode CacheVanilla settings: 30-40% improvementTurn off APC Stat: additional ~2ximprovement-- Understand what is happening herehttp://www.slideshare.net/vortexau/improving-php-application-performance-with-apc-presentationSaturday, May 18, 13
    68. 68. Cache Data in aKey-Value StoreSaturday, May 18, 13
    69. 69. APC User Cache<?php$foo = "Hello, World!";apc_store(some_key, $foo);?><?phpvar_dump(apc_fetch(some_key));?>-------- Output --------string(12) "Hello World!"Saturday, May 18, 13
    70. 70. APC User CacheSaturday, May 18, 13
    71. 71. APC User Cache• Avoid fragmentation - keep utilization under 10%Saturday, May 18, 13
    72. 72. APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MBSaturday, May 18, 13
    73. 73. APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are > 10KB before storingSaturday, May 18, 13
    74. 74. APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are > 10KB before storing• Reduce garbage collection in the source ofapc_store()Saturday, May 18, 13
    75. 75. APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are > 10KB before storing• Reduce garbage collection in the source ofapc_store()• Consider CDBSaturday, May 18, 13
    76. 76. APC User Cache• Avoid fragmentation - keep utilization under 10%• Assign 1GB, only fill 100MB• Compress objects that are > 10KB before storing• Reduce garbage collection in the source ofapc_store()• Consider CDB• http://engineering.wayfair.com/moving-constants-out-of-apc-and-into-cdb/Saturday, May 18, 13
    77. 77. Memcached• Usually a separate server• In-memory key-value store• Extremely simple and fast• http://memcached.org/Saturday, May 18, 13
    78. 78. APC vs. MemcachedAPC User Cache MemcachedLocal to the Server Shared Network ResourceGood for small objects Large or small objectsGood for mostly readworkloadsCan read and write quicklyOnly one instance Can be clusteredSaturday, May 18, 13
    79. 79. Fix All Errors• PHP 5.3: E_ALL | E_STRICT• PHP 5.4: E_ALL• Can also do error_reporting(-1);Saturday, May 18, 13
    80. 80. Child Processes4-6 processes per CPU core.Beyond that just add servers.(Test your app)Saturday, May 18, 13
    81. 81. HipHop for PHP• Developed/Open Sourced by Facebook• Now a VM + JIT compilation• 5x improvement in throughput over PHP 5.2• http://developers.facebook.com/blog/post/2010/02/02/hiphop-for-php--move-fast/• https://www.facebook.com/notes/facebook-engineering/speeding-up-php-based-development-with-hiphop-vm/10151170460698920• https://github.com/facebook/hiphop-phpSaturday, May 18, 13
    82. 82. UnderstandFrameworkOverheadSaturday, May 18, 13
    83. 83. http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/Saturday, May 18, 13
    84. 84. Saturday, May 18, 13
    85. 85. Saturday, May 18, 13
    86. 86. Saturday, May 18, 13
    87. 87. Symfony is 20xslower than rawPHPSaturday, May 18, 13
    88. 88. Load TestingSaturday, May 18, 13
    89. 89. JMeter• Open Source• Generate load via a GUI or commandline• Can watch req/s degrade with moreusers• Easy to useSaturday, May 18, 13
    90. 90. Saturday, May 18, 13
    91. 91. Saturday, May 18, 13
    92. 92. Saturday, May 18, 13
    93. 93. Saturday, May 18, 13
    94. 94. Saturday, May 18, 13
    95. 95. Be CarefulSaturday, May 18, 13
    96. 96. Be Careful• JMeter looks a lot like a DOS attackSaturday, May 18, 13
    97. 97. Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failingSaturday, May 18, 13
    98. 98. Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is runningSaturday, May 18, 13
    99. 99. Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is running• Run in ProductionSaturday, May 18, 13
    100. 100. Be Careful• JMeter looks a lot like a DOS attack• Make sure you know what is failing• Look at monitoring while test is running• Run in Production• Run a test, make a change, run it againSaturday, May 18, 13
    101. 101. TakeawaysSaturday, May 18, 13
    102. 102. “How Fast IsYour Site?”Saturday, May 18, 13
    103. 103. This is a terrible quesitonSaturday, May 18, 13
    104. 104. Why is it terrible?Saturday, May 18, 13
    105. 105. Why is it terrible?• Lack of contextSaturday, May 18, 13
    106. 106. Why is it terrible?• Lack of context• Are we talking about average or a percentile?Saturday, May 18, 13
    107. 107. Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?Saturday, May 18, 13
    108. 108. Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is measuring it?Saturday, May 18, 13
    109. 109. Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is measuring it?• When is it being measured?Saturday, May 18, 13
    110. 110. Why is it terrible?• Lack of context• Are we talking about average or a percentile?• Server side time or client?• Who is measuring it?• When is it being measured?• Real users or synthetic?Saturday, May 18, 13
    111. 111. We still have to answer itSaturday, May 18, 13
    112. 112. Pick Tight SLAs“The homepage of our site will load in<300ms at the 80th percentile, measuredby sampling 10% of our real users over a24 hour period every day at 8AM.”Saturday, May 18, 13
    113. 113. Pick Tight SLAs“The homepage of our site will load in<300ms at the 80th percentile, measuredby sampling 10% of our real users over a24 hour period every day at 8AM.”Saturday, May 18, 13
    114. 114. Things to RememberSaturday, May 18, 13
    115. 115. Things to Remember• Measure and monitor your applicationSaturday, May 18, 13
    116. 116. Things to Remember• Measure and monitor your application• Focus on big winsSaturday, May 18, 13
    117. 117. Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHPSaturday, May 18, 13
    118. 118. Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make sure you are using APC correctlySaturday, May 18, 13
    119. 119. Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make sure you are using APC correctly• It’s always the database (stay in this room)Saturday, May 18, 13
    120. 120. Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make sure you are using APC correctly• It’s always the database (stay in this room)• Caching is your friendSaturday, May 18, 13
    121. 121. Things to Remember• Measure and monitor your application• Focus on big wins• Run the latest (stable) version of PHP• Make sure you are using APC correctly• It’s always the database (stay in this room)• Caching is your friend• Know what system resources you depend onSaturday, May 18, 13
    122. 122. There is a lot more to talk aboutSaturday, May 18, 13
    123. 123. Get in Touchhttp://web-performance.meetup.com/www.etsy.com/careersjonathan@etsy.com@jonathankleinSaturday, May 18, 13
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×