title: Best practices for optimizing LAMP sites for speed?
body: <p>I want to know when building a typical site on the LAMP stack how do you optimize it for the best possible load times.  I am picturing a typical DB-driven site.</p>
  
  <p>This is a high-level look and could probably pull in question and let me break it down into each layer of the stack.</p>
  
  <p>L - At the system level, (setup and filesystem) can you do to improve speed?  One thing I can think of is image sizes, can compression here help optimize anything?</p>
  
  <p>A - There have to be a ton of settings related to site speed here in the web server.  Not my Forte.  Probably depends a lot on how many sites are running concurrently.</p>
  
  <p>M -  MySQL in a database driven site, DB performance is key.  Is there a better normalization approach i.e, using link tables?  Web developers often just make simple monolithic tables resembling 1NF and this can kill performance.</p>
  
  <p>P - aside from performance-boosting settings like caching, what can the programmer do to affect performance at a high level?  I would really like to know if MVC design approaches hit performance more than quick-and-dirty.  Other simple tips like are sessions faster than cookies would be interesting to know.</p>
  
  <p>Obviously you have to get down and dirty into the details and find what code is slowing you down.  Also I realize that many sites have many different performance characteristics, but let's assume a typical site that has more reads then writes.</p>
  
  <p>I am just wondering if we can compile a bunch of best practices and fully expect people to link other questions so we can effectively workup a checklist.</p>
  
  <p>My goal is to see if even in addition to the usual issues in performance we can see some oddball things you might not think of crop up to go along with a best-practices summary.</p>
  
  <p>So my question is, if you were starting from scratch, how would you make <em>sure</em> your LAMP site was fast?</p>