Web Hosting Talk







View Full Version : mysql overload , RAM reach 85%


8998
12-26-2004, 04:09 PM
Please help.

How to tune mysql.cnf if meet cpu load like below:

Top Process %CPU 96.2 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/rh.xxx.com.pid --skip-locking
Top Process %CPU 96.0 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/rh.xxx.com.pid --skip-locking
Top Process %CPU 17.0 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/rh.xxx.com.pid --skip-locking

My server:
DUAL XEON 3.06
RAm 2 GB
RHE + php4.3.10 + mysql 4.0.22

regards
Robert Xtra

andreyka
12-26-2004, 05:08 PM
Well, need before show in mysql process and show mysql runtime status :)

Sherby
12-26-2004, 07:04 PM
You hosting anything which connects to mysql?
If so It could be lots of bots loading onto your httpd coursing the load to go high, If you think its this tell me and I can post you somethings to help the load

linux-tech
12-26-2004, 09:34 PM
mysql overload , RAM reach 85%

It's quite normal for the Linux OS to reach 85% of ram usage within days, sometimes hours of rebooting. This doesn't indicate a problem at all. Linux is smart enough to where it will free what's needed for whatever reason when it's needed.


You can see an example configuration I posted for MySQL in this post (http://www.webhostingtalk.com/showthread.php?s=&threadid=357384), its pretty all inclusive,a nd I haven't had a problem with it (although those aren't my true max_con and max_user con values). Good luck!

8998
12-27-2004, 07:05 AM
thanks for all comments.

linux-tech,
could you please describe meaning of max_user connections?
At your post, u put only 20. Is it enough for large connections in the same time?
and thread_cache=8, is it acceptable?

andreyka,
because I already restart server and now in normal conditions.
If it reach high again, I will copy the status here.
Now. I plan to use setting from linux-tech
sherby,
I only host one site at there.
It's contains heavy mysql_query. application is for soccer market.
Exactly I need to tuning mysqlto perfect state. If still can not, I plan to get quad xeon.

regards.,
Robert xtra

linux-tech
12-27-2004, 12:18 PM
max_user_connections means the max total concurrent connections per user. There is no reason for this to be over 20, unless someone's got a really poorly coded application.
I push between 60 and 100 queries a secondand the most processes I've seen from any of my users is 5 (just now). IF the application is handled and coded properly, then things will be fine. If not, then you'll have issues.