Hi all,
I have an VPS with:
RAM: 1,5 GB
Mysqld: 5.5
I am running Joomla on that VPS with around 10,000 visits daily. But my VPS usually is down and RAM is over.
Please could you help me to optimize the My.cnf and httpd.conf
My.cnf:
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 128M
key_buffer=16M
max_connections=500
max_user_connections=300
myisam_sort_buffer_size = 64M
wait_timeout=5000
key_buffer = 128M
max_allowed_packet = 32M
table_open_cache = 256
table_cache = 4000
max_allowed_packet=16M
thread_cache=32
thread_cache_size=8
join_buffer_size=4M
sort_buffer_size = 6M
sort_buffer=4M
net_buffer_length = 16K
read_buffer_size = 2M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
interactive_timeout = 100
thread_cache_size = 286
query_cache_size= 256M
query_cache_type=1
query_cache_limit=128M
connect_timeout=10
tmp_table_size=128M
max_heap_table_size=128M
delayed_insert_timeout=5
slow_query_log = 1
slow_query_log_file=/var/log/mysql/log-slow-queries.log
long_query_time = 1
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
Httpd.conf:
Listen 80
Timeout 10
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 1
MinSpareServers 15
MaxSpareServers 30
StartServers 30
MaxClients 200
MaxRequestsPerChild 5000
HostnameLookups Off
Please advise
Many thanks and kind regards
I have an VPS with:
RAM: 1,5 GB
Mysqld: 5.5
I am running Joomla on that VPS with around 10,000 visits daily. But my VPS usually is down and RAM is over.
Please could you help me to optimize the My.cnf and httpd.conf
My.cnf:
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 128M
key_buffer=16M
max_connections=500
max_user_connections=300
myisam_sort_buffer_size = 64M
wait_timeout=5000
key_buffer = 128M
max_allowed_packet = 32M
table_open_cache = 256
table_cache = 4000
max_allowed_packet=16M
thread_cache=32
thread_cache_size=8
join_buffer_size=4M
sort_buffer_size = 6M
sort_buffer=4M
net_buffer_length = 16K
read_buffer_size = 2M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
interactive_timeout = 100
thread_cache_size = 286
query_cache_size= 256M
query_cache_type=1
query_cache_limit=128M
connect_timeout=10
tmp_table_size=128M
max_heap_table_size=128M
delayed_insert_timeout=5
slow_query_log = 1
slow_query_log_file=/var/log/mysql/log-slow-queries.log
long_query_time = 1
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
Httpd.conf:
Listen 80
Timeout 10
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 1
MinSpareServers 15
MaxSpareServers 30
StartServers 30
MaxClients 200
MaxRequestsPerChild 5000
HostnameLookups Off
Please advise
Many thanks and kind regards