MySQL Forums
Forum List  »  Performance

100% cpu usage on single cpu core
Posted by: ds sd
Date: December 15, 2009 04:53AM

Hi all,

I really need your help on finding the solution for my problems. Fyi, i'm using 2 X quad core processor with 8gb of RAM. This server is a dedicated database server. So, my problems are, the mysql process always use 1 cpu core at 1 time and it used 100% of the cpu resource. I'am not sure why it happen like it. Below are my server 'TOP' status, as you can see cpu4 use 100% usage while others like at idle state.


top - 18:27:53 up 103 days, 7:14, 3 users, load average: 1.10, 1.07, 1.02
Tasks: 191 total, 1 running, 190 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.0% us, 0.3% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 0.0% us, 0.0% sy, 0.0% ni, 99.3% id, 0.7% wa, 0.0% hi, 0.0% si
Cpu2 : 0.3% us, 0.0% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu3 : 0.0% us, 0.0% sy, 0.0% ni, 98.6% id, 1.4% wa, 0.0% hi, 0.0% si
Cpu4 : 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu5 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu6 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu7 : 0.0% us, 0.0% sy, 0.0% ni, 99.7% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 8165752k total, 8077196k used, 88556k free, 493192k buffers
Swap: 4096532k total, 276k used, 4096256k free, 6326856k cached

PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
11395 mysql 16 0 100 39700:41 2.2 706m 172m 4764 S mysqld


Below is my.cnf configuration file

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package)
old_passwords=1
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
log_queries_not_using_indexes = On
log_slow_queries=/var/lib/mysql/log-slow-queries.log

innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:100M:autoextend
set-variable = innodb_buffer_pool_size=100M
set-variable = innodb_additional_mem_pool_size=10M
innodb_flush_log_at_trx_commit=1

#skip-innodb
skip-name-resolve
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 16
set-variable=max_connections=2000

[mysql.server]
user=mysql
basedir=/var/lib

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

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Options: ReplyQuote


Subject
Views
Written By
Posted
100% cpu usage on single cpu core
9502
December 15, 2009 04:53AM
3175
December 17, 2009 12:27AM
3054
December 23, 2009 04:34PM
2708
December 23, 2009 04:49PM
2609
December 23, 2009 06:07PM
3397
December 23, 2009 08:52PM
2473
December 23, 2009 09:53PM
2847
December 24, 2009 03:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.