hello,
i host few blogs on a single server ( Intel Xeon @ 2.80GHz with hyper-threading + 2GB ram + 36GB hdd SCSI ) that have around 32000 hits / day and a peak of around 50000 hits / day and between 250 and 1500-2000 comments / day spread around 2 of the bussiest blogs.
From time to time when there is something important announced and users refresh the pages like crazy and comment alot the server can't handle it and the load average gets very high and sites are not usable anymore.
Last time it happened yesterday and i tried to fix it somehow but nothing i did worked (changed some apache/mysql configs) so im asking for your help maybe there is something i can do so it can handle more hits without adding an extra server.
From what i could saw using top the mysql didn't seem to be the problem (it used ~2% memory and 10-20% max cpu) but few apache processes that were eating each between 20% and 40% cpu, but maybe im wrong.
Server hosts 2 normal Wordpress blogs and 2 WordpressMu (16 blogs one the busy one and 65 the less busy one) with just Akismet plugin on all and ENABLE_CACHE set in wp-config.php
Below are my server configs, if i forgot anything that could be relevant please tell me.
My Apache/2.0.58 configs are:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000
Mysql 5.0.26 configs are:
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_type = 1
query_cache_size = 50M
query_cache_limit = 5M
max_connections = 500
log-slow-queries = /var/log/mysql/slowquery
long_query_time = 4
thread_concurrency = 8
My PHP 5.1.6 configs:
max_execution_time = 30
max_input_time = 60
memory_limit = 256M
magic_quotes_gpc = On
mysql.allow_persistent = On
i also have APC with the following config:
apc.enabled="1"
apc.shm_segments="1"
apc.shm_size="30"
apc.optimization="0"
apc.num_files_hint="1024"
apc.ttl="7200"
apc.user_ttl="7200"
apc.gc_ttl="3600"
apc.cache_by_default="1"
apc.file_update_protection="2"
apc.enable_cli="0"
apc.max_file_size="1M"
apc.stat="1"
apc.write_lock="1"
Thank you for your time :)