Solved

How to force MySQL to use 4 cores on a Quad Core Processor

Posted on 2012-04-04
4
1,286 Views
Last Modified: 2012-04-04
I am looking to make MySQL server take full advantage of my CPU. It is alleged that the 64bit version does take advantage, however it is only using 1 of my 4 cores available (64bit 5.1 MySQL Server for Windows).

Is there a configuration option that needs to be set in the my.ini file or is there something else that needs to be "set" in order for this to work.

I have also tried elevating the task to no avail, and all 4 cores are checked off for it to use, however it is acting like a 32 bit application, even though it is most definitely the 64bit distribution.
0
Comment
Question by:microvb
  • 2
4 Comments
 
LVL 21

Expert Comment

by:oleggold
ID: 37808120
that could be licensing feature, the default for free open source is 1 cpu, to use more they want You to buy enterprise version at oracle.com
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 37808412
No there should be no additional licensing involved.  http://dev.mysql.com/doc/refman/5.1/en/faqs-general.html#qandaitem-B-1-1-8  states that "MySQL is fully multi-threaded, and will make use of multiple CPUs, provided that the operating system supports them.".

I'm able to use multi-core everytime, even on my desktop, but I only use linux boxes so I can't tell what to check on a Windows installation.  What I do notice though, is most of the time I only see 1 cpu being utilized, with additional cpus being used every now and then during high loads.  @microvb, just how much load is your instance experiencing right now?
0
 
LVL 3

Author Comment

by:microvb
ID: 37809017
@johanntagle

Some of the queries i need to process take a long amount of time due to extra calculations / etc being performed within the query. I was able to dramatically reduce some of the queries with a bit of index tweaking, however it seems that no single query can cause the server to use more than 1 core ...  so 1 core per query, where I would like to have it automatically roll into the other cores for queries that would ordinarily take a long time, lots of calculations / etc.

(this one query was going to take 45 minutes, reduced down to 3 seconds through indexes).
0
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 37809072
Ah yes you are bound to one core per sql.  That is by design.  one way around it to use table partitioning and rewrite  the query to multiple ones.  i haven't had the need to do it so I really cannot explain it well, but you can google for "mysql intra-query parallelism"
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question