Slides from my talk at RootConf 2012, Bangalore. The talk covered some general tips and practices to be followed when building web applications for scale using the LAMPhp stack
One crashed process dosen’t affect the others Not as fast as some other possible designs - Really ?? 26/05/2012 RootConf Apache 2.0 Multi-Processing Modules mpm_prefork mpm_worker
1 stat and realpath system call 26/05/2012 RootConf 1 include: 1 stat and realpath system call Relative paths : too many stat system calls Minimal include_path Reduce logging : prevents disk writes error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
of working data set Storage Engine: MyISAM vs InnoDB InnoDB works well in most cases, unless you need full text search 26/05/2012 RootConf InnoDB works well in most cases, unless you need full text search Cache static data: Memcached Swap Space: Actually made us
bottlenecks 2) iostat : Disk activity, useful for db systems 3) pmap : Process memory dump 4) strace: Analyzing system calls 5) sar : System activity reporter, good for postanalysis 26/05/2012 RootConf 5) sar : System activity reporter, good for postanalysis 6) netstat : Complete network dump 7) htop : Prefer over top 8) cut / tr : Analyzing Apache Access Logs