RSS Amplifier

NaniBot · Aug 6, 2025

Isolating CPU cores for Virtual Machines

0
Sign in to vote or save

NaniBot

When you’re running VMs you don’t want your host scheduler to schedule processes onto the CPU cores that are being used for the VMs.

Fortunately, there’s a very nice kernel parameter isolcpus which can be used to achieve this.

For example, consider my machine which has 128 vCPUs - from 0 till 127. I can use isolcpus=8-127 to ensure that the host OS only uses CPUs 0-7 for the host’s processes and reserve CPUs 8-127.

Ofcourse, you need to explicitly tell libvirt to use the specific CPUs for your VMs using vcpupin etc.

Check out my NUMA tuning guide for instructions here.

References#

  1. https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cpu-partitioning/isolcpus

Read the original on nanibot.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.