I'm attempting to set the affinity of mysql (latest Percona Server) on a 4vCpu VPS virtualized with OpenVZ and running CentOS 6.x.
The command I'm running is taskset -pc 0-1 1026
. I've also tried 0,1
instead. The output is:
pid 1026's current affinity list: 0-3
pid 1026's new affinity list: 0-3
So, it does not seem to be 'sticking'. It can be confirmed by running taskset again to find the cpu's available to the process. Is this an issue with my virtualization type, perhaps?
I'm doing this because every now and then I need mysql to run quite hard, and going over 2.0-4.0 for more than 2 hours gets me a restart with my current provider.
Is there a clear reason why this isn't working, or is more troubleshooting required?