MySQL Forums
Forum List  »  Performance

How do I get MySQL to use more than one core?
Posted by: Arthur Pemberton
Date: December 31, 2013 08:17PM

How do I get MySQL to consume multiple cores?

I have a 4-core VM with the with Centos 6.4 64bit with mysql-server 5.1.71-1.el6. My problem is that regardless of the number of connections, MySQL only ever seems to use 1 core. I am going off of the my CPU usage monitor provided by the VM host, and the machine only ever uses one of the four cores -- the machine is dedicated to mysql so there are no other significant processes on it.

I have a serveral databases on the mysql server instance. I have a mix of MyISAM and InnoDB. I have verified that the most active database is entirely InnoDB tables. I have done some rudamentary performance tuning, and will provide the relevant portion of my my.cnf.

This instance is dedicated to serving Wordpress based websites, so the usage characteristics are pretty much the same across all the databases.

I've googled the topic extensively, and some places say that MySQL does not make use of multiple cores, others say that it does. Mine does not currently, but I would like to believe that I can get it to use all the cores.

-- my.cnf --
symbolic-links=0
character-set-server=utf8
collation-server=utf8_general_ci
connect_timeout=10 # Increase connect_timeout from 5 to 10
default-character-set=utf8
default-collation=utf8_general_ci
default-storage-engine=InnoDB # choose between MyISAM and InnoDB
innodb_thread_concurrency=0 # allow automatic thread management
innodb_file_io_threads=64
#innodb_read_io_threads=64
#innodb_write_io_threads=64
interactive_timeout=120 # Decrease interactive_timeout from 28800 to 100
join_buffer_size=1M # Increase join_buffer_size from 131072 to 1M
long_query_time=2 # define a slow query
max_allowed_packet=16M # Increase max allowed packet size from 1M to 16M
max_connections=500 # increase max number of connections
query_cache_limit=2M # Increase query cache limit from 1048576 to 2M
query_cache_size=128M # Increase query_cache_size from 0 to 128M
query_cache_type=1 # turn on query cache
read_buffer_size=2M # Increase read buffer size from 1M
read_rnd_buffer_size=4M # Increase read_rnd_buffer_size to 4M
slow_query_log=1 # turn on slow log
slow_query_log_file=mysqld.slow.log
sort_buffer_size=2M # Increase sort buffer size from 1M
table_cache=1024 # Increase table cache cache from 256 to 1024
thread_cache_size=32 # increase thread cache
wait_timeout=60 # Decrease wait timeout from 8hrs
------------

Options: ReplyQuote


Subject
Views
Written By
Posted
How do I get MySQL to use more than one core?
40596
December 31, 2013 08:17PM


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.