Optimizing Apache/MySQL
So what do you guys think is the best way to optimize Apache/MySql? I have a site that gets a large number of hits that is driving up load to massive amount and memory usage is at about %100.Heres my apache.conf:
Timeout 5
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 6000
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 10
MaxClients 100
MaxRequestsPerChild 2000
</IfModule>
<IfModule worker.c>
StartServers 8
MaxClients 6000
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 2000
my.cnf:
set-variable=key_buffer_size=64M
set-variable=max_allowed_packet=32M
set-variable=table_cache=32M
set-variable=query_buffer=32M
set-variable=max_connections=600
set-variable=sort_buffer=8M