Mysql optimization for Cpanel | Ram2 & Cpu Intel(R) Xeon(R) CPU X3460 @ 2.80GHz

Amirali

Registered
Mar 17, 2013
2
0
1
cPanel Access Level
Root Administrator
I'm in the process of optimizing my moodle installation/server it has about 7 separate sites of varying usage. Reports and other tasks seem to be timing. looked at my.cnf and noticed it was empty. /etc/my.cnf

I did a locate and all others i've found haven't had the standard or much info either
server specs:
2gb memory
Intel(R) Xeon(R) CPU X3460 @ 2.80GHz + Intel(R) Xeon(R) CPU X3460 @ 2.80GHz
I realize my mysqltuner is only for a couple days. i'll certainly post another at the end of this week if it helps get a better baseline of what kind of config would make sense to better utilize the servers possible performance from a sql standpoint.
thanks much!
 

arunsv84

Well-Known Member
Oct 20, 2008
373
1
68
127.0.0.1
cPanel Access Level
Root Administrator
We cant provide the exact optimized values for MySQL. You can try to start from minimum values and modify according to the traffic/requirement.


[mysqld]
max_connections=300
safe-show-database
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 3M
table_cache = 1800
thread_cache_size = 256
tmp_table_size = 64M
wait_timeout = 12
connect_timeout = 9
max_allowed_packet = 16M
max_connect_errors = 10
read_rnd_buffer_size = 512K
query_cache_limit = 2M
query_cache_size = 64M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
A sample my.cnf will look like above. You can modify this later according to your server performance and mysqltuner output. If you are not sure about this, I would recommend you to hire a administrator.

Cheers!!!