Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 serverfault.com/questions/49138/… –  anttir Nov 11 '11 at 16:34
1  
Looks interesting, but all is around Linux commands and tools if I get it correctly. –  Meligy Nov 12 '11 at 1:19
    
what about mysql limits, would they help you? dev.mysql.com/doc/refman/5.0/en/user-resources.html –  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 Nov 12 '11 at 11:58
    
stackoverflow.com/questions/2777137/… 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
show 2 more comments

1 Answer

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 Nov 10 '11 at 3:49
add comment

Your Answer

 
discard

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.