After years having to deal with higher traffic = high loads on different servers and trying different things I came to the following conclusions so anyone out there can benefit from the following:
1) You must have a 2nd Hard drive so you can place the database files there (/var/lib/mysql should reside on a separate disk)
2) You must use a php accelerator such as Xcache or eaccelerator ( I prefeer xcache)
3) You must configure the parameters in httpd.conf and my.cnf according to your hardware specs ..
In httpd.conf set Timeout low (30-40)... Most people advise to turn keepalive on.. however, I disagree when you run a really heavy traffic server you should set it to OFF... you can download the script apacheload and look for apache connections in real time (I believe anything over 5 thousand connections is high traffic). It is also important to set Maxclients to a high value such as 512. Since we are handling so many connections we should also raise the conecction limit parameter in my.cnf to a higher value (F.i. max_connections=300).
Also, you should lower the values for the following parameters ( I recomend the following):
wait_timeout=60
connect_timeout=10
interactive_timeout=120
It is also important to lower CPU usage by raising the value of thread_cache_size on my.cnf. Also, key_buffer_size should be set to at least 25% of your total RAM.
4) Most high loads are consequential of heavy disk IO operations.. you must try to keep your log file rotation interval very low.. set it to rotate for file size no greater to 1GB.
5) On sata disks you MUST INCREASE read_ahead (hdparm -v /dev/sda will show your current drive settings).... hdparm -a1024 /dev/sda sets your SATA HD (/dev/sda) to use 1024 as readahead.
6) If you ran qmail or postfix on same machine you must create a ram disk and place your queue in there. You must set concurrencylocal and concurrencyremote to higher values to speed up things (F.i. local=50 and remote=100).. It is important to set backups for the queue cause once you restart your machine you will loose the queue's data.
7) You must have 127.0.0.1 as your primary name server on /etc/resolv.conf.. you can then place your secondary nameservers (theplanet's name servers)... this is important for speed.
I know I posted very general info and I might have forgotten to mention other suggestions.. however please feel free to comment/ask/suggest about this.
Thanks
