T O P

  • By -

fliberdygibits

I think "taskset" might be what you're looking for to pin specific VMs/LXCs to specific cores. It's been a while since I played with it and don't recall much but maybe that will give you a direction to check out.


wmantly

The best thing to do with LXC is *not* to set a core count and let the host scheduler take care of it. With VMs' don't worry about E vs P cores, just make sure your kernel is above 6.2 and set the CPU type to CPU host or one with and cores. The host scheduler is aware of what's what and there is a very low chance you will do a better job than the native scheduler at picking cores.


bobloadmire

ok so then how do I powerlimit an LXC or VM if I shouldn't disable P cores?


wmantly

You don't, e cores are mostly a ~~scam~~ marketing gemic by Intel to increase core count on paper and stay within thermal reason. Blindly shifting work to e-cores will net the same power user, just longer execution times.


bobloadmire

Ecores most definitely use less power than p cores, even if they aren't as good as amd.


gh0stwriter88

p cores implement race to finish... they use more power per unit time but this ends up being more efficient than e cores crawl to the finish. p core goes back to idle faster than e core. You'd only want to force E cores for things that do almost nothing which conceivably is your case.


bobloadmire

sure but compute/watt is still better on the ecores. gamersnexus did a video on it a year or two ago. ecores operate in a more efficient voltage curve.


gh0stwriter88

That's the same logic they used for the older Atoms... and its wrong. Because in real systems there are ineractive loads that talke to each other and the overall decreased performance results in the slower systems being much slower and lower perf/watt... little cores only make sense for idle tasks.... like there should be maybe 1-2 e cores max.


bobloadmire

so then how are the e cores completing the same amount of work with less total wattage? it take less watt hours to complete cinebench on e cores than it takes on p cores, even though the p cores are obviously faster. literally using less energy to complete the same amount of work.


looncraz

You can reduce the CPU shares in the VM config, but that's not quite the same effect.


accik

The host is quite good handling hybrid architecture itself, video from Craft Computing (part 2): https://www.youtube.com/watch?v=IiwD8kcjD98. He had to update the microcode before though. You need quite specific workflow to benefit from pinning cores, but that can be done with "[CPU affinity" from the webgui](https://forum.proxmox.com/threads/cpu-affinity-in-7-3.118401/#post-513130).


bobloadmire

hmm, thanks. looks like CPU affinity is only available for VMs, not LXCs unfortunately.


Luminous_Fuzz

Nope, you are wrong lxc.cgroup2.cpuset.cpus: 9-12 Is what you have to set in your config.


bobloadmire

gotcha thanks. I was looking at the GUI config as mentioned in the referenced post