Question

On Linux, can you ensure that MySQL leaves one core free?

(We have a small Python server that can become unresponsive when MySQL running on the same box is under load.)

Was it helpful?

Solution

3 ways I can think of...

  • Use the command taskset.
    This command will "fix" specific core (or list of cores) to a specific process.
    Consult the man page how to use it
  • Create Virtual machine on your "little" server and run the mysql on that VM.
    This will promiss more stability to both services
  • Use the "nice" values to make sure the python priority is higher then the mysql priority.
    (This solution is the least recommanded of all three, but in some cases it can be valid)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top