Score:2

Ubuntu Intel Alder Lake poor performance

gp flag

I have just built a new rig with 128GB memory with Intel Alder Lake i7-12700K and Ubuntu 22.04 for scientific workloads. I have tried 5.15, 5.19, and 6.0 kernels and all give me miserable performance - about 10% of what I get out of Windows 11 on the same box. This is not a VM. The CPU is at 100% all the time, and no I/O is happening. Core frequencies fall to 3600 MHz from 5000 to prevent overheating. A bunch of runnable processes, nothing else is going on.

vmstat looks like

rocs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 108 0 0 107811280 110328 4593640 0 0 156 13 307 588 93 0 7 0 0 116 0 0 107811536 110328 4593648 0 0 0 0 5242 4764 97 0 3 0 0 115 0 0 107840544 110328 4565200 0 0 0 0 5341 5097 97 0 2 0 0 113 0 0 107830096 110328 4578160 0 0 0 0 5178 4994 96 0 4 0 0

Any suggestions?

Thx

ChanganAuto avatar
us flag
3.60GHz IS the "Performance-core Base Frequency" for an i7-12700K. It has nothing to do with preventing overheating, 3.60GHz - 3.80GHz is the normal frequency range. It can go up to 5GHz ONLY if required. What exactly are you running that can requires the "Max Turbo Frequency"? And what are you running in Windows?
TesterLNX avatar
gp flag
It may be. When there is no load it shows 5GHz. Regardless, the performance is very poor. So poor, in fact, that it is hard to explain buy some little thing. There has to be something wrong with it in the major way. Like I said, I'm running massively parallel scientific workloads, all CPU and very little I/O. Other apps, like a web server, feel sluggish too.
ChanganAuto avatar
us flag
I'm assuming you have both OSes installed in a SSD or NVMe, right? And no additional Nvidia graphics card by any chance?
TesterLNX avatar
gp flag
Nvme install in both. But no, I/O anyway. No graphics other than what's on the motherboard.
Doug Smythies avatar
gn flag
I would suggest the use of turbostat (linux tools common package, I think) to monitor what is going on. I typically use `sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt,CorWatt --interval 15` and by deleting the `--quiet` option various throttling flags can be observed. When you say 10% of what windows gets, is that for the same workflow? For parallel CPU intensive testing, and as a way to compare with what others are getting, I like to use [prime95](https://www.mersenne.org/download/), but also use phoronix tests. I am using a i5-10600K.
TesterLNX avatar
gp flag
Another piece of information. The workloads involve multiple processes, each of which performs processing in steps. Each process has 5-10 threads. I have tried running not 20-30 processes as I need, but a few. Turns out that if I run one, the step processing time is about half a second. With two processes it increases to 1.2. With three it goes up to 25 seconds and with four it goes up to a roughly minute. It looks to me as if without preemption it is relatively efficient, but when processes preempt each other it becomes very inefficient.
Doug Smythies avatar
gn flag
Add that information to the question, including vmstat output and, if possible, turbostat output. Very interesting.
TesterLNX avatar
gp flag
I have not yet been able to run turbostat. I was running 6.0 and they don't have it for this kernel yet. I'll park this until I figure out what to do. It looks as if for now I need to continue on windows. I was hoping Linux will give me better performance, but it turns out it is worse. Perhaps as this becomes more mainstream there will be fixes.
Doug Smythies avatar
gn flag
turbostat is not kernel dependant, but [Ubuntu makes it so](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1844201). Very annoying. Just run the binary directly, by-passing the dependency wrapper. Try kernel 6.1-rc1 when it comes out in 1.5 weeks, as there are a couple of Alder Lake specific patches, but I don't know if they will help you. Not sure what else to suggest, I would try the performance CPU frequency scaling governor (if you didn't already) and disabling one idle state at a time (although you only seem to be idle 2 to 3%).
TesterLNX avatar
gp flag
Thanks for your suggestions. It has to be related to Alder Lake, I can not believe that the Linux kernel would have such a basic problem on a fundamental level. So, I'm stuck on Windows for now until I see that someone on the kernel team takes up this issue, acknowledges the problem, and fixes it. Hopefully, reasonably soon - there must be quite a few people running similar stuff.
Doug Smythies avatar
gn flag
I can help with getting attention on the issue, but a way for others to recreate/demonstrate the problem is needed. I have looked at some Phoronix CPU intensive test results, but haven't yet found an example of Alder Lake showing particularly poor results. As a test, I would try limiting my workflow to using only P-Cores, as there still seems to be ongoing work on scheduling improvements between P and E cores.
Doug Smythies avatar
gn flag
Mainline [kernel 6.1-rc1](https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.1-rc1/) is available.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.