Status
Not open for further replies.

First-Dragon

Active Member
187
2011
130
40
I have a problem on my VPS, last few days i am getting high load of cpu probably caused by mysql, here is a result of top command:

http://gyazo.com/a5473090fb03b5894839609bf2727634

I have WordPress site on this server, VPS have good specs,2gb ram and 4 cpu's . I have 60k posts on site and most people online at same time is around 100. Site is on nginx server.

Any thoughts of how to reduce the load. Thanks.
 
10 comments
We'll need to know a few things:

cat /etc/my.cnf /etc/mysql/my.cnf
grep -c processor /proc/cpuinfo
free -mt
du -shc /var/lib/mysql/*/*.* | tail -n1
mysqladmin proc stat
 
Hope this help:

cat /etc/my.cnf /etc/mysql/my.cnf

718282782a75bb640332e06a6d5552a8
718282782a75bb640332e06a6d5552a8.png


6585ba08e01dab4a652bddc589d7051c
6585ba08e01dab4a652bddc589d7051c.png


0a841545b065e7db80fcfb1ee7048959.png



grep -c processor /proc/cpuinfo

8

free -mt

60d56cf6f459403dd3902a4f97bc5c6c.png



du -shc /var/lib/mysql/*/*.* | tail -n1

1.1G total


mysqladmin proc stat

32d92485a80fcf50a4201490000a3ab1.png



0a841545b065e7db80fcfb1ee7048959
 
backup everything from my.cnf to notepad, delete content of my.cnf , then try this:

[mysqld]
skip-innodb
skip-bdb

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

hit service mysqld restart

sometimes nothing there works the best
 
Is this normal for database of wordpress site:

This table is 550mb and wp_posts is 272mb:

Table: wp_cbnetpo_ping_optimizer

Records: 4,291,085

Data Us: 558.9 MiB

Index Usage: 41.9 MiB
 
Each persons my.cnf will not be the same due to each having 1 or more cpu's and having more ram then the other.

With a empty my.cnf you will take on more cpu load since nothing is set to be used in memory. When a mysql is optimized it will balance all the table queries to memory which creates a faster and more responsive mysql.

This is why most hosts/sites get slow due to bad configs. EMPTY CONFIGS ARE VERY BAD!!

@First Dragon: ping optimizer table may just be caching ip activity and pages to keep from users having to load it them selfs. Just do a wordpress database clean up and it should lower that number
 
Status
Not open for further replies.
Back
Top