Please advise the My.cnf optimization

nakhoa

New member
Joined
Oct 19, 2011
Messages
3
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
 
Hi,

I did the mysqltunner but not much information that I could apply.

Please anyone can advise

Thanks

NAK
 
It's unlikely that anyone is going to be able to guess correctly. If forced to guess, I'd say the problem has to do with how your VPS is assigning resources. Better guesses might come if you told us what kind of VPS you're running, and more about the processor resources you've been assigned.

In fact better guesses might come from your VPS vendor, as they hopefully know the limitations and methodologies of the VPS they've set up for you.

If you want more than a guess, you'll probably need to hire someone to use mysqltuner on your system after knowing these things, and after your site has been up for some time, with some decent history in the logs, and after turning on logging of slow queries. While optimization is a science, it's also at least partly an art, and we don't have near enough information as to what you might want to try.

Jeff
 
Hi,

Here are information of my VPS:

OS Template: Centos 5
RAM 1,5GB
CPU number: 8
CPU limit: 800% 50% Core (~1.33 Ghz)

I would love to find some one to help or hire but I don't know how.

Please help

Many thanks and warm regards

NAK
 
Back
Top