Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows VPS (Windows 2008 R2 x64) that runs a couple WordPress blogs and other few ASP.NET things. The VPS runs 2 CPUs (for example).

With ASP.NET, in such situation, I usually set the app pool to use one CPU / Core, and SQL Server to use the other one (just change it in the server properties).

In MySQL, can I tell it which CPU(s) / Core(s) to use?

share|improve this question
possible duplicate… – anttir Nov 11 '11 at 16:34
Looks interesting, but all is around Linux commands and tools if I get it correctly. – Meligy at GuruStop.NET Nov 12 '11 at 1:19
what about mysql limits, would they help you? – anttir Nov 12 '11 at 8:34
Unfortunately not. None of them seems to be related to CPU. I want MySQL to try to use as much RAM as it wants, as much space (in its drive) as it wants, and as much CPU usage as 100% of a specific given CPU, not trying to use the other CPUs. – Meligy at GuruStop.NET Nov 12 '11 at 11:58… was mentioned one solution:" you can right click the process in the task manager and set the affinity. This will define which cores are allowed to run the process." – anttir Nov 12 '11 at 13:37

Maybe not the answer you were looking for, but you could use a hypervisor like vmware esxi and use processor affinity to lock the virtual machine to any number of specific cpus.

share|improve this answer
This is not on the host. I do not own the host. I own only the VPS. One VPS. I want to do this on the 2 CPUs that are dedicated to this VPS. Actually the fact it is a VPS is not even relevant here (sorry for confusion). I just explained the exact situation. – Meligy at GuruStop.NET Nov 10 '11 at 3:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.