0

I have a Ubuntu VMWare VM that was given 6 CPUs, but rarely sees a load above 1. It is running in a vSphere 5.5 cluster.

Nowing that VMWare's CPU scheduler has to clear 6 CPUs for processing this VM, I want to reduce the CPU count and improve performance across the host; however, I'd like to do this without downtime to the 6 CPU VM.

I have run the following commands to disable three of the CPUs without disruption.

echo 0 | sudo tee /sys/devices/system/cpu/cpu5/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu4/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online

By disabling these CPUs in the OS kernel, have I actually sent the ESXi host the appropriate signals to require only clearing 3 of its cores to perform action on this server instead of 6?

If this doesn't work, is there another way to do this without downtime on the VM?

1 Answer 1

1

This doesn't send anything below your kernel any signals. What it DOES do is restrict your scheduler from creating new processes on those cores, and vacates those cores of exiting processes.

This will allow you to safely hotplug them by - in your case - reducing your core count to three. The effect will be immediate, though you may get a very small time in which your system freezes (less than a few milliseconds).

You need to have vCPU hotplug enabled for your virtual machine in order for this to work. Enabling this will also disable vNUMA, a memory bandwidth optimization technology that may help you in high load situations - though it doesn't sound like this is your situation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .