MySQL Forums
Forum List  »  Performance

Re: How do I get MySQL to use more than one core?
Posted by: Rick James
Date: January 02, 2014 01:19PM

The simple answer: One MySQL connection won't use more than one core.

The longer answer:

* Oracle may soon come out with _some_ operations that use multiple cores.

* Each connection runs independently, so separate connections can use separate cores. However, it would be up to your code to coordinate between the connections.

> My problem is that regardless of the number of connections, MySQL only ever seems to use 1 core.

This is likely to be because each connection runs so fast that the OS never gets around to using more than the one core. Does the monitor indicate that it is sometimes using 100% of that one core? If so, then we should dig further; multiple connections using 100% of one core probably indicates that it could use more than one core.

> I have a serveral databases on the mysql server instance.
> I have a mix of MyISAM and InnoDB.
> provide the relevant portion of my my.cnf.

No impact on this question.

> This instance is dedicated to serving Wordpress based websites

What is the web server? Apache? Other? If Apache, what is the setting of MaxClients? The issue is the parallelism in the web server. This effectively controls the number of connections.

Also, do
SHOW PROCESSLIST; -- to see if multiple connections are running
SHOW STATUS LIKE 'Max_used_connections'; -- to see that the high-water-mark was.

You have turned on the slowlog (this is good). See if anything has shown up in it.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How do I get MySQL to use more than one core?
17731
January 02, 2014 01:19PM


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.