mysql if using too much CPU of my VPS.

Can anybody help me?
Basically my app is for an email marketing, so using a while statement its reads from a db (mysam) and make updates

Thank in advance!!

This is the info about my VPS (when typing )
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Mem: 1206272 kB
OS: CentOS release 5.3 (Final)
Mysql: 5.0.45-log

This is my my.cnf:
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

###The MySQL server
[mysqld]
set-variable=local-infile=0
port = 3306
socket = /var/lib/mysql/mysql.sock
ft_min_word_len = 3
key_buffer = 32M
max_connections = 400

log-slow-queries = 1
log-queries-not-using-indexes = 1

key_buffer_size = 256M
query_cache_limit = 10M

long_query_time = 5

join_buffer_size = 3M

max_allowed_packet = 32M

table_cache = 443

sort_buffer_size = 32M

read_buffer_size = 10M

myisam_sort_buffer_size = 32M

thread_cache = 4M

wait_timeout=500

connect_timeout = 300

interactive-timeout = 1200

query_cache_size=256M

query_cache_type = 1

thread_concurrency = 8

max_user_connections = 300

log-error = /var/log/mysqld.log
old-passwords = 1

skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqldump]
quick
max_allowed_packet = 2M

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

[isamchk]
key_buffer=200M

sort_buffer_size = 4M
read_buffer = 2M
write_buffer = 4M

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

[mysqlhotcopy]
interactive-timeout

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

There could be several

There could be several issues, but most probably it is your sql that is not using proper indexes and eating up on cpu. Check on your slow logs.

Quick glance through my.cnf -- you could probably increase your thread_cache and reduce query_cache_size.

Feel free to get in touch with me via the contact form if you need further assistance.

Comment