0
votes

i am using vps server and when i type top always i see code below

cpu | pid  | user  | command
2.2 | 3954 | mysql | /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/xxx.hostname.com.err --pid-file=/var/lib/mysql/xxx.hostname.com.pid

i dont understand what is this? how can i reduce this value? this is running after restart and never stop.

1
Need some more info to figure out what is going on - I would dump the contents of SHOW PROCESSLIST in MySQL first to see if there are any queries sitting there chewing up CPU time. MySQL slow log (if configured) may also hold the answer to your CPU issue. - shannonman
| 1605 | eximstats | localhost | eximstats | Sleep | 4150 | | | | 12514 | leechprotect | localhost | leechprotect | Sleep | 3281 | | | | 13303 | root | localhost | | Query | 0 | | show processlist | - canerkoroglu

1 Answers

0
votes

Unless I'm missing something you are running the MySQL (mysqld) database on your VPS.

In terms of the CPU overload, my guess is that something is running a CPU intensive query on it. You can take a look at the slow query log to see if there are any queries that are taking a while (i.e. eating up your CPU).

The log is usually in /var/log/mysql/mysql-slow.log.