Solved

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

Posted on 2012-04-04
4
1,432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

634 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