of software applications in computing. • Apdex = (Satisfied Count + Tolerating Count / 2) / Total Samples • Example: if there are 100 samples with a target time of 3 seconds, where 60 are below 3 seconds, 30 are between 3 and 12 seconds, and the remaining 10 are above 12 seconds, the Apdex score is: • (60 + 30 / 2 )/ 100 = 0.75 T Saturday, 7 September, 13
PHP file is requested, it is read by PHP interpreter and “compiled” into machine language for execution (Opcode). • Opcode caching reduces the interpretation time by storing the Opcode in memory. • No need for re-compilation = Faster • http://en.wikipedia.org/wiki/List_of_PHP_accelerators Saturday, 7 September, 13
PHP in a web server. • PHP is fundamentally very fast. But how it runs on the web server has memory impact. • mod_php - easy to install, only on Apache. • FastCGI - some config required, runs on any web server. • PHP-FPM - Alt FastCGI implementation. • Compiled PHP via HipHop Saturday, 7 September, 13
the friendly manual! • Native PHP functions are optimized for speed and performance. • eg. Array functions, sort functions. • Only write it if its not available in your PHP version. Saturday, 7 September, 13
1 • Use faster HDD (SSD) (I/O bound) • Get faster CPU (process bound) • Get faster network card / more bandwidth (network bound/ high latency) Saturday, 7 September, 13
slow query log. • Use a faster data store (in-memory data store = faster read/ write) • Memcache, Redis, MongoDB, Couchbase, etc. • Measure the performance vs your current setup. Saturday, 7 September, 13
it is part of the Apache memory process. But it gets loaded even when serving that don’t need PHP. • Use separate server for static content (Nginx or CDN). • Distribute the concurrent load (Load balancing). • Caching Server (HAProxy, Varnish Cache). • Try FastCGI/PHP-FPM. • Measure different setup. Saturday, 7 September, 13
Non-blocking processes - asynchronous tasks, no locking, improve response time. • File caching of views and data. • Abstraction layers - easily switch between standalone or multi- server architecture. • Flush your output buffer as soon as you can. Saturday, 7 September, 13
CMS is easy to install & configure. Limited by what they provide. • General Purpose Framework is more open to hacking and alternative ways of doing things. Not easy to setup. Saturday, 7 September, 13