Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slow compilation time on meteor lake laptop
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5263
Location: Bavaria

PostPosted: Wed Nov 27, 2024 11:38 pm    Post subject: Reply with quote

keekkenen wrote:
[...] Maybe you have the wrong kernel config, it's makes sense.

PO said in his first post he is using our distribution kernel (and I have checked the systemlog): 6.11.10-gentoo-dist
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 136

PostPosted: Thu Nov 28, 2024 12:02 am    Post subject: Reply with quote

pietinger wrote:
6.11.10-gentoo-dist

Exactly.
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 136

PostPosted: Wed Dec 25, 2024 2:51 pm    Post subject: Reply with quote

Hi, I have new insights. I came across the following recently published article.
https://www.notebookcheck.net/Lenovo-ThinkPad-E14-G6-laptop-review-Fixes-lots-of-problems-on-the-E14-G5.927075.0.html#

It's about the same laptop series as mine, only with a slightly worse CPU. They test Intel Core Ultra 7 155U and mine CPU is Intel Core Ultra 155H.

The following test is interesting for me.
Code:
7z b 4

“4” means 4 iterations (this is a good idea because of the longer load, I previously tested the default 1 iteration). It’s multi threading test with all available threads.


They got a result of 41498 MIPS. My result on gentoo is about 30000 MIPS, so clearly weaker despite a better CPU. So I started comparing it on updated windows 11. I got results similar to gentoo. However, on Windows I used the default power profile. The default profile is balance and this is currently the only profile for laptops. However, you can set your own profiles. Procesor power management / minimum processor state is 5 % on balanced and I changed it to 100 % on my own profile. Result? About 40000 MIPS. So clearly better, but still worse than on notebookcheck with 155U.

On lenovo website I found two critical chipset updates for my laptop.
- Intel Processor Power Management (PPM) Package for Windows 11 (Version 22H2 or later) – ThinkPad
- Intel Neural Processing Unit Driver

From intel.com
Quote:
Intel® PPM driver installs the PPM package that provides a tuned and optimized power management settings for the processor to improve responsiveness, battery life and performance.


After installation, performance improved. I'm currently getting results of about 47000-52000 MIPS on Windows. So it's plausible for what you read in the article.

So everything indicates that the results on Linux are a firmware/driver/software issue. Linux currently works for me on a similar principle to Balanced Windows without additional patches. It would be great to achieve results of 50000 mips on linux because it would significantly reduce compilation time.

Can I somehow adjust the kernel for this? And do you know anything about PPM on Linux? Perhaps it is also a matter of time until the appropriate code appears in the latest kernel versions. My hardware is quite new and actually appeared in laptops only in recent months.

Edit:
The strange thing:

Code:
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance


The scaling_governor looks good. So it looks like Linux supports this processor worse than Windows. I guess I'll have to ask on the kernel mailing list.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5263
Location: Bavaria

PostPosted: Thu Dec 26, 2024 8:24 am    Post subject: Reply with quote

nxe9 wrote:
[...]They got a result of 41498 MIPS. [...] Result? About 40000 MIPS. So clearly better, but still worse than on notebookcheck with 155U.

We dont know which Linux they use. Please keep in mind that our Gentoo distribution kernel has some hardening options enabled as default. You could try - only for testing - booting with the command line parameter: "mitigations=off" (this cancel all mitigations) and test again the speed.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6180
Location: Dallas area

PostPosted: Thu Dec 26, 2024 2:26 pm    Post subject: Reply with quote

You could try using taskset with emerges. (man taskset)

That cpu has 6 performance cores w/hyperthreading giving you 12
8 ecores w/no hypertreading
2 ecores low power with no hypertreading

So I would probably use taskset with 0-11 (from what I've read that should be the performance cores) and adjust to -j12 or so.
(the only way I would know if the 0-11 is correct is to try it)

Without using taskset you will sometimes use either the ecores or the low ecores both of which would impact performance.

Edit to add: lstopo should show which cores are which

Eta2: should look like this https://blog.reds.ch/wp-content/uploads/2024/07/ultra7lstopo.png
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 136

PostPosted: Thu Dec 26, 2024 10:02 pm    Post subject: Reply with quote

@pietinger: They use windows with performance profile.

Quote:
Testing Conditions

We set Windows to Performance mode prior to running the benchmarks below.


Thanks, I will try the mitigations=off later


@Anon-E-moose
Thanks. What you write about is a slightly different topic, but also interesting. So far I have only set MAEKOTPS="-j12". Surprisingly, after setting this, programs compile about 10-20% faster. I think this is because the system then assigns work to more efficient cores. Otherwise, most of the work is done on slower ones. I haven't dealt with taskset yet. If I understand you correctly, the idea is to assign only the efficient kernels to emerge? I will have to look into this.


Back to the topic of performance with 7z.

The latest live usb arch has kernel 6.12.1 and I tried it. The performance is better, about 38000 MIPS. I am currently using Gentoo 6.11.11. I just have to try 6.12 on gentoo first. Maybe there are some fixes there.

Here's a quick summary of mine Ultra 155H:
- Gentoo 6.11.11: ~30000 MIPS
- Arch Live USB 6.12.1: ~38000 MIPS
- Windows 11 Balanced Profile: ~30000 MIPS
- Windows 11 Performance Profile: ~40000 MIPS
- Windows 11 Performance Profile with PPM Chipset update: ~50000 MIPS

- Ultra 155U Windows Performance from notebookcheck.net: ~41000 MIPS.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6180
Location: Dallas area

PostPosted: Fri Dec 27, 2024 1:00 am    Post subject: Reply with quote

You can use taskset for any application, a browser, or emerges, or anything you really want performance for.

I use it for my qemu vm's.

Should be as simple as "taskset -c 0-11 emerge -v <whatever>" or "taskset -c 0-3 firefox" to keep firefox on the performance cores
or "taskset -c 12-15" to have it use the ecores.

Does "taskset -c 0-11 7z ..." show any performance difference? As 7z is being forced to stay on the pcores.

Edit to add: taskset just pins an app to a one or more cores/threads. Doesn't matter what the app is.

Do keep in mind when assigning cores/threads it's best to assign threads for the core together.
On my amd cpu, threads 0 and 8 are on core 0.
In your case it's a little nicer as your core 0 threads are "0 1" (so nice linear progression)

So if you wanted to give 8 cores/threads to some app you would do something like this "taskset -c 0-7 <application>"
which uses the first 4 pcores, leaving 2 for other work along with all ecores.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 136

PostPosted: Sat Dec 28, 2024 11:51 pm    Post subject: Reply with quote

@pietinger

New information...

Gentoo 6.12.7, mitigations off/on, thermald and laptop-mode-tools services off/on, in all cases the max. value is about 32000.

Arch live usb 6.12.1, mitigation is on (checked with lscpu), max test result about 42000. So the result is comparable to that on Windows (performance profile without PPM).

I can reproduce test results very reliably.

In short, arch linux performs about 30% better than gentoo in multicore. There must be some reason for this, but what? Does gentoo-kernel have some sub-optimal configuration?


One difference, on archlinux

Code:
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
...
powersave


Interesting. The scaling_governor is powersave instead of performance...

Edit:
No improvement after
Code:
# cpupower frequency-set -g powersave

on gentoo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum