LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-04-2011, 09:44 AM   #1
varshajain87
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: 0
MYSQLD taking high CPU system usage


Hii All,
We are using wordpress with MYSQL. Both the app and DB server are different with 6CPU and 6GB RAM and 32bit processor.

We had noticed recently that mysqld process is taking too much of system usage- ranging upto 100% of CPU utilization while having the load of 1200-1600 concurrent users.

Pasting d my.cnf file-
# The following options will be passed to all MySQL clients
[client]
port = 3306
socket = path
bind-address = hostname
datadir = path
# Here follows entries for some specific programs

# The MySQL server
[mysqld]
skip-name-resolve
port = 3306
socket = path
datadir = path
bind-address = host name
skip-locking
open-files=10000
bulk_insert_buffer_size = 32M
connect_timeout=10
interactive_timeout=400
join_buffer=32M
join_buffer_size = 4M
key_buffer = 2048M
key_buffer_size = 1024M
max_allowed_packet=16M
max_connect_errors=10
max_connections=1500
max_heap_table_size = 1024M
table_cache=4096
sort_buffer_size = 512M
net_buffer_length = 8K
read_buffer_size = 8M
read_rnd_buffer_size = 80M
myisam_sort_buffer_size = 1024M
myisam_max_sort_file_size =1024M
max_heap_table_size = 1024M
query_cache_type =1
query_cache_limit = 256M
query_cache_size = 512M
query_prealloc_size = 65K
query_alloc_block_size = 128K
record_buffer = 1M
tmp_table_size = 2048M
thread_cache_size=1024
thread_concurrency=16
wait_timeout=500
max_write_lock_count = 1 #To force MySQL to temporarily elevate the priority of all SELECT statements that are waiting for a table after a specific number of inserts to the table occur. This allows READ locks after a certain number of WRITE locks.
low_priority_updates = 1
open_files_limit = 32768
max_join_size =2048M #added
flush
flush_time=3600
######concurrent_insert=2 #added for insert very slow

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

[mysqldump]
quick
max_allowed_packet = 64M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 32M
write_buffer = 32M

[isamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer_size = 32M
write_buffer_size = 32M

[mysqlhotcopy]
interactive-timeout



Kindly help us if we are missing something. And also help us with the high system usage not the user usage?

Thanks for your time...

Varsha

Last edited by varshajain87; 05-04-2011 at 09:51 AM.
 
Old 05-04-2011, 12:54 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,634

Rep: Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573
Quote:
Originally Posted by varshajain87 View Post
Hii All,
We are using wordpress with MYSQL. Both the app and DB server are different with 6CPU and 6GB RAM and 32bit processor.

We had noticed recently that mysqld process is taking too much of system usage- ranging upto 100% of CPU utilization while having the load of 1200-1600 concurrent users.

Kindly help us if we are missing something. And also help us with the high system usage not the user usage?
No way for us to know. First, what version of MySQL, and on what version/distro of Linux? Aside from that, there are MANY things to check:
  • How are the servers connected?
  • Same LAN or different?
  • What speed are the network connections?
  • Firewalls between the two?
  • Any network changes recently?
  • Any changes to the web code recently?
  • Channel bonding, or single NIC's?
  • How big is the database?
  • Version of Wordpress?
  • Changes/updates to Wordpress, MySQL, or Linux recently??
There are many pieces to this puzzle.
 
Old 05-05-2011, 03:56 AM   #3
varshajain87
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,
MYSQL version 5.1.41
Linux Version - 2.6.18-238.9.1.el5PAE (mockbuild@x86-004.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP
Wordpress Version - 3.0.1
  • Connected in a LAN
  • Network speed is 1 gbps
  • No Firewall
  • Changes made in my.cnf for tuning - please check are they properly configured?
  • No bonding as ther are no multiple network cards
  • This is a VMware Virtual machine
  • Done partitioning of tables by primary key
  • Database size in what terms - has 48 tables- predefined tables for wordpress + few tables for OWA and rolescoper plugin. Currently OWA is deactivated from application end but the tables are still there.
  • No changes made in wordpress n linux.
Plz revert in case of any other queries.

Last edited by varshajain87; 05-05-2011 at 03:57 AM.
 
Old 05-05-2011, 09:44 AM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,634

Rep: Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573
Quote:
Originally Posted by varshajain87 View Post
Hi,
MYSQL version 5.1.41
Linux Version - 2.6.18-238.9.1.el5PAE (mockbuild@x86-004.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP
Wordpress Version - 3.0.1
  • Connected in a LAN
Ok...are these servers in the same rack? Building? Connected to the same switch, or through different switches? Has the switch been examined, to see if it's getting overloaded?
Quote:
  • Network speed is 1 gbps
All the way from one server to another? What else is running on those boxes? Is the network connection getting saturated?
Quote:
  • No Firewall - Ok
  • Changes made in my.cnf for tuning - please check are they properly configured?
No way for us to know what "properly" is. As said before, there are many variables.
Quote:
  • No bonding as ther are no multiple network cards
Depending on your usage of the existing network link, that may not be a problem.
Quote:
  • This is a VMware Virtual machine
Uhhh...really?? BOTH of them are, or just one? What are the resources you've got dedicated to the DB and Web servers?
Quote:
  • Done partitioning of tables by primary key
  • Database size in what terms - has 48 tables- predefined tables for wordpress + few tables for OWA and rolescoper plugin. Currently OWA is deactivated from application end but the tables are still there.
  • No changes made in wordpress n linux.
Plz revert in case of any other queries.
Spell out your words. Text-speak garbage isn't nice for anyone to read.

Database size in number of records and/or disk space used. If you've got 48 tables, and they've only got 10 records a piece, that's trivial. If you've got 4 tables, each with 10 million records each...that's far different, even though you've got fewer tables. Chances are you're having a problem because this is running in a VM, rather than on a dedicated server. VM has overhead associated with it, and depending on the resources you've got assigned to it, you're overloading it because it's running as fast as it can. Can only ask so much of a machine. If this is a mission-critical machine, then I'd strongly suggest putting it on dedicated servers - NOT VM.

And since you're using RHEL...the best step you could take would be to CALL REDHAT SUPPORT, since you're paying for it, right?
 
  


Reply


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
High system CPU usage Uruclef Linux - Server 2 04-12-2011 09:56 AM
Xorg high cpu usage system/video not running smoothly twon Linux - General 5 02-20-2011 05:58 PM
High load and high cpu kernel usage enid Linux - Server 8 09-30-2010 03:33 AM
Strange high system CPU usage in a multithreaded program Strahlemann Programming 0 09-03-2007 12:58 PM
Why do I have a High System CPU Usage Bottleneck linuxboy69 Linux - Software 3 09-02-2004 03:55 PM


All times are GMT -5. The time now is 09:41 AM.

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