Ryzen 9 5900x vs i7-12700k

I am going to build a workstation to work only in Qubes. I can’t choose between Ryzen 9 5900x and i7-12700k. How do p-core and e-core work in Qubes?
Will Ryzen perform better in Qubes considering it doesn’t have power efficient cores?

Qubes by default disables SMT, which means P cores can’t hyper-thread, and the governor is set to ondemand.

If you run Qubes with default settings, you can consider E and P cores the same. You can configure the system to take advantage of the P cores, but you would need to enable SMT and configure the system with CPU pinning.

There is a desktop PC using 12th gen that is qubes certified FidelisGuard, it could be an advantage if there are compatibility issues in the future.

The 12700K can use the MSI Z690 motherboard, if you want to use open source firmware, the Z690 is the only modern motherboard that can run coreboot.

2 Likes

Yes, I know about the disabled smt for amd and intel. So it turns out that a task that requires more performance from a p-core while still being able to arbitrarily use an e-core? If so, would Ryzen be better given that p and e cores are the same in Qubes and there is no load balancing between p and e cores? Or even if p and e cores are the same in Qubes, I won’t see much difference in performance between 5900x and 12700k?
Honestly, this is a dark forest for me, any help would be welcome.

I think you can expect similar performance from both CPUs, you should focus more on hardware support than CPU stats.

Ryzen 7000 serie you probably want to avoid having to deal with this kind of compatibility issues, and just because something works on Windows or Linux does mean it will work on Qubes.

Kernel 5.18 or 6.0 adds support for Intel thread director, as far as I understand it, this helps to distribute the load between p and e cores. Will this work in Qubes?

AFAIK, no. It is Xen that’s in charge of distributing CPU resources and scaling CPU frequency. So kernel-based optimization for CPU perhaps won’t take effect here.

Thanks for an interesting answer.
Do you have a link to some information or even guide about how to do CPU pinning in Qubes OS?

I’m using jinja to customize libvirt, and I use a prefix on my qubes which decides what cores the qube runs on.

https://dev.qubes-os.org/projects/core-admin/en/latest/libvirt.html
https://libvirt.org/formatdomain.html#cpu-allocation

I also use xl to move dom0 to the E cores.

3 Likes

Fascinating. If you think this actions do really improve comfort of using Qubes OS, you should consider writing a guide about this stuff. I have not seen approach being used for Qubes OS before. Now when we have different types of cores - it can be especially important.

But even when user does not care about core types - does CPU-pinning allow him to allocate the power of one core to some particular qube? So, any CPU-load in other qubes won’t affect the performance. I think, the standard Qubes OS “No vCPU” setting does not allow to achieve that, does it?

Yes, it allows you to pin a vm to a specific core or set of cores, and you know which cores are P and E.

E.g. the 12900K has 16 cores, 8 P and 8 E cores, 0-15 are P cores and 16-23 are E cores, and with SMT disabled only the cores 0,2,4,6,8,10,12,14 + 16-23 are active.

You can use the cpuset option to tell Xen on which cores you want the VM to run, and if you use a range then Xen automatically tries to balance the load on the selected cores.

1 Like

I can’t figure out what happens to performance when a cube is assigned to an e-core. How does xen/qubes distribute the load between cores? P and E cores have different frequencies, does the xen/qubes scheduler recognize when the more powerful p core needs to be used when the load on the e-core is high.