exact pin vcore to physical core

efeu

Renowned Member
Nov 6, 2015
91
8
73
While running low latency tasks in VMs, you may want to pin your vcores to physical cores to not loose caches and avoid moving tasks to cores which are running on lower frequency first when moving to them.

The existing pve_helper scripts managed to pin the qemu CPU threads to a "CPU pool", while this will keep you lvl3 cache, but not lvl1/2.

I see a lot of threads here and on Reddit where ppl ask how to do this on proxmox, like it is possible with libvirt.

I wrote a little script for my VM for a 16/32 CPU. Feel free to modify and use it on your own.

To do so you have to reenable croups v1 (dunno if this has any negative effect)

It's quick and dirty, so first modify it for your usecase

https://github.com/efschu/proxmox_cpupin
 
If you do such hardcore devirtualization, I'd also recommend using hugepages to get an additional good 10% more memory allocation performance. And of course enable NUMA-awareness.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!