Database cause high server load

Status
Not open for further replies.
how many visitors your site is getting per day on average?
is your db is mysql or postgres?
Visitors varies.
Mysql.

Hi,

Optimizating my.cnf is a really hard work bur you should optimize it from your server specs..

This whole week i was trying to optimize my.cnf not becouse i am having high CPU usage just for been ready :)

You can use the command "/usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl" into SSH thru putty and you will get some suggestions..

This thing should made every day or every 1-3 days to see what the script will suggest you to change :)

this is a loong term run so you wont see the changes imediatly :)
Thank you sady92.
The command you wrote in case you have cpanel, isn't it?
Well, i don't have cpanel, just server run with webmin.
I have red previously about optamization of my.cf , but didn't find anything regarding how to reduce CPU load, only how to reduce the ram usage:
http://library.linode.com/troubleshooting/memory-networking

Mybb is optimized to use accelerator, install it
Can you give me the link of the tutorial on how to install it? Iam using Ubuntu 10.04 .
Thank you.
 
I use this to my VPS i am use 2 GB ram same with u and my.cnf this u can following

i never got overload

[mysqld]
datadir =/var/lib/mysql
socket =/var/lib/mysql/mysql.sock
log_slow_queries =/var/log/mysql/mysql-slow.log
user=mysql
old_passwords=1
port = 3306
skip-locking
key_buffer = 128M
myisam_sort_buffer_size = 64M
max_allowed_packet = 32M
table_cache = 1024
thread_cache_size = 512
join_buffer_size = 2M
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 512K
net_buffer_length = 256K
thread_stack = 256K
tmp_table_size = 32M
query_cache_limit = 2M
query_cache_size = 32M
query_cache_type = 1
thread_cache_size = 256
thread_concurrency = 4
long_query_time = 1
skip-bdb
skip-innodb

[mysqldump]
quick
max_allowed_packet = 32M

[mysql]
no-auto-rehash
#safe-updates

[mysqld_safe]
open_files_limit = 8192

[isamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[myisamchk]
key_buffer = 32M
sort_buffer_size = 32M
read_buffer = 32M
write_buffer = 32M

[mysqlhotcopy]
interactive-timeout

[client]
socket=/path/to/mysql.sock
 
@cyper: Thank you for the config. I'll try to compare them with mine and see what to optimize.

@sady: thank you for the link, it seems easy to install.
I will try to install it.

Thanks.
 
Status
Not open for further replies.
Back
Top