tart
tart copied to clipboard
Introduce reserve / pinning / affinity of CPUs
We currently try to fix problems around benchmarking for our MacOS VMs that use Tart. One problem i noticed is that there is no option to "reserve" CPU cores for the VMs nor to pin them on the same cores. Would be nice if such options could be introduced or at least documented on why they do not exist.
Unfortunately, this is behaviour of the underlying Virtualizaiton.Framework which I tried to document in #584
We also see disturbances when running on a M2 chip with 4 performance and 4 efficiency cores. When running a single VM with 4 cores it will use all the performance cores and when there are 2 VMs they will split 2 and 2 cores which lowers the performance.
What kind of testing are you performing? Do you run two VMs at a time?
@fkorotkov @zimmski Is there a way to limit CPUs or default to use them all? Also, is there a way to set the RAM size for memory?
There is no way to default to use all the available resource. You can configure CPUs and memory via tart set though. Please refer to tart set --help.
@fkorotkov https://eclecticlight.co/2023/10/23/how-does-macos-manage-virtual-cores-on-apple-silicon/
I don't think we'll ever be able to pin CPUs so will close the issues as not planned. Virtualization.Framework does a good job of balancing the load between performance and efficiency cores.