< 10 sec to keep user’s attention Full Page Load – 2 Seconds Base HTML – 400ms http://www.nngroup.com/articles/response-times-3-important-limits/ Saturday, May 18, 13
< 10 sec to keep user’s attention Full Page Load – 2 Seconds Base HTML – 400ms Server Generation Time – 300ms http://www.nngroup.com/articles/response-times-3-important-limits/ Saturday, May 18, 13
count($rows); for ($i = 0; $i < $max; $i++) { echo $i; } require_once() is slow Minimize use of define() Yes, single quotes are slightly faster than double quotes, but... Saturday, May 18, 13
is ~20-40% faster than 5.3 http://news.php.net/php.internals/57760 Upgrading 5.2 --> 5.4 gives a 45-70% improvement! http://php.net/migration53 Saturday, May 18, 13
is ~20-40% faster than 5.3 http://news.php.net/php.internals/57760 Upgrading 5.2 --> 5.4 gives a 45-70% improvement! http://php.net/migration53 http://php.net/migration54 Saturday, May 18, 13
is ~20-40% faster than 5.3 http://news.php.net/php.internals/57760 Upgrading 5.2 --> 5.4 gives a 45-70% improvement! http://php.net/migration53 http://php.net/migration54 Saturday, May 18, 13
additional ~2x improvement -- Understand what is happening here http://www.slideshare.net/vortexau/improving-php-application-performance-with-apc-presentation Saturday, May 18, 13
10% • Assign 1GB, only fill 100MB • Compress objects that are > 10KB before storing • Reduce garbage collection in the source of apc_store() Saturday, May 18, 13
10% • Assign 1GB, only fill 100MB • Compress objects that are > 10KB before storing • Reduce garbage collection in the source of apc_store() • Consider CDB Saturday, May 18, 13
10% • Assign 1GB, only fill 100MB • Compress objects that are > 10KB before storing • Reduce garbage collection in the source of apc_store() • Consider CDB • http://engineering.wayfair.com/moving-constants-out-of-apc- and-into-cdb/ Saturday, May 18, 13
Server Shared Network Resource Good for small objects Large or small objects Good for mostly read workloads Can read and write quickly Only one instance Can be clustered Saturday, May 18, 13
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 again Saturday, May 18, 13
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
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
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 Saturday, May 18, 13
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 on Saturday, May 18, 13