Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

HIGH CPU caused by mysql

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Locked
  • Print view
Advanced search
6 posts • Page 1 of 1
vestacp89
Posts: 83
Joined: Thu Aug 14, 2014 11:04 am

HIGH CPU caused by mysql

Post by vestacp89 » Fri Mar 13, 2015 3:30 pm

Hello,

I have big cpu caused by mysql, 3 vcores, centos 6 64bits

Image

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=200
max_user_connections=30
wait_timeout=30
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log

#innodb_use_native_aio = 0
innodb_file_per_table

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

Code: Select all

+----------------+-------------------+-------------------+-------------------+
| Storage Engine | Data Size         | Index Size        | Total Size        |
+----------------+-------------------+-------------------+-------------------+
| InnoDB         |           1.81 MB |         256.00 KB |           2.06 MB |
| Total          |           1.81 MB |         256.00 KB |           2.06 MB |
+----------------+-------------------+-------------------+-------------------+
2 rows in set (0.08 sec)
How to fix this ? If you need some more information just say.

Thanks.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: HIGH CPU caused by mysql

Post by skurudo » Sat Mar 14, 2015 6:21 am

In mysql console you can see processlist and detect what load CPU.
It's in many cases fat mysql request.

http://dev.mysql.com/doc/refman/5.0/en/ ... slist.html
Top

vestacp89
Posts: 83
Joined: Thu Aug 14, 2014 11:04 am

Re: HIGH CPU caused by mysql

Post by vestacp89 » Sat Mar 14, 2015 7:44 pm

skurudo wrote:In mysql console you can see processlist and detect what load CPU.
It's in many cases fat mysql request.

http://dev.mysql.com/doc/refman/5.0/en/ ... slist.html
I add in terminal:

Code: Select all

SHOW FULL PROCESSLIST
but this not work, i use centos 6 ?

Thanks.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: HIGH CPU caused by mysql

Post by skurudo » Sat Mar 14, 2015 9:53 pm

It's for mysql console, login to the console first
mysql -uroot -puserpassword
Top

vestacp89
Posts: 83
Joined: Thu Aug 14, 2014 11:04 am

Re: HIGH CPU caused by mysql

Post by vestacp89 » Sun Mar 15, 2015 9:43 am

skurudo wrote:It's for mysql console, login to the console first
mysql -uroot -puserpassword
Hello,

i login with root in terminal do:

Code: Select all

mysql 
and then

Code: Select all

SHOW FULL PROCESSLIST
and not work ?

Thanks.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: HIGH CPU caused by mysql

Post by skurudo » Sun Mar 15, 2015 2:10 pm

SHOW FULL PROCESSLIST;
Top


Locked
  • Print view

6 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password