Making sure the host don’t schedule any work on specific cores by updating grub and passing the following parameters:
sudo vi /etc/default/grub
Then updating the following line:
GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory systemd.unified_cgroup_hierarchy=false isolcpus=3,8"
Updating grub and reboot to load the new kernel parameters to isolate specific cores:
sudo update-grub
Makes the host don’t schedule any job on those cores by looking at the workload per core using:
htop
Starting a LXD vm pinning it on those cores does not seems to be scheduling jobs on them anymore, as it used before the latest lxd release/kernel update.
lxc launch ubuntu:24.04 test --vm -c limits.cpu=3,8
lxc shell test
root@test:~# for i in $(seq $(getconf _NPROCESSORS_ONLN)); do yes > /dev/null & done
# Output the following
#[1] 1232
#[2] 1233
#[3] 1234
#[4] 1235
htop on the vm shows all 2 cores at 100%.
htop on the host show cores (other than 3 or 8) spiking at 100%, it seems like lxd vm is now scheduling the workload on the cores available to the host instead of the isolated one reserved exclusively for the lxd vm.
This used to be working fine earlier this year 2024. Any ideas how I can make the lxd queue vm workload on isolated cores?