Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-18-2014, 05:42 AM   #1
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Rep: Reputation: Disabled
MySQL server started to increase CPU load to high value, how to fix?


I've noticed that from yesterday, my OpenVZ VPS, started to lag, I host a few sites on it that have total of 300-400 active users all time.

VPS Specs:
CPU: 4 Cores / 69% CPU usage
HDD: 40GB / 30 Used
RAM: 4GB / 1.5GB Free

MySQL process shows 180-250% cpu usage almost every second, and my VPS provided does not like that. The problem started yesterday when my views on the sites increased.

I think that both databases use InoDB although I'm not 100% sure.

I tried disabling some intensive MySQL queries from the website, but that didn't help a lot, there is about milion rows of data and maybe more in the database of the seconds site. When I disable the second site from the apache and restart apache2 and mysql service load decreases drastically.

I don't have a lot of knowledge about tweaking the database, i'm more a programmer than sysadmin, but currently I need to do both.

port            = 3306
socket          = /var/run/mysqld/mysqld.sock
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

# * Basic Settings
user            = mysql
pid-file        = /var/run/mysqld/
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
bind-address            = XXXXX
# * Fine Tuning
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
myisam-recover         = BACKUP
query_cache_limit       = 1M
query_cache_size        = 16M
expire_logs_days        = 10
max_binlog_size         = 100M

max_allowed_packet      = 16M

#no-auto-rehash # faster start of mysql but no tab completition

key_buffer              = 16M

# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
!includedir /etc/mysql/conf.d/
I've tried increasing buffer sizes but, nothing has changed.

What do you recommend me to do in order to decrease that load?

Best Regards!

Last edited by Vita; 08-18-2014 at 05:52 AM.
Old 08-18-2014, 07:22 AM   #2
Registered: May 2012
Distribution: Debian 6, CentOS 6
Posts: 39

Original Poster
Rep: Reputation: Disabled
So I didn't have luck configuring the server so I migrated the database of the busy site to another server, so load is now spread out.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql server not responding with high cpu usage and high load avgs landysaccount Linux - Server 2 09-15-2013 03:46 AM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
KDE 4.5.3 / X Server / Nvidia Card Issue (High CPU load of X) Jack128 Slackware 6 12-01-2010 08:48 AM
[SOLVED] high CPU load X server Mario Blunk SUSE / openSUSE 3 02-08-2010 09:11 AM
ftp server high cpu load littleking Slackware 1 11-24-2003 03:13 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration