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

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 128

PostPosted: Sat Nov 23, 2024 5:32 pm    Post subject: Slow compilation time on meteor lake laptop Reply with quote

Hi, compilation on my laptop seems to take too long for me. firefox needs about 60 minutes to build on my Ultra 155H. I can reproduce it. On my old desktop i7-4790k it takes about 50 minutes. All 22 threads are used at 100 % according to htop. What I notice is that on the laptop htop shows cpu usage in blue (low priority). I think that's the problem. I haven't configured any power management so far. I have no idea how the kernel manages this and why it decides for restrictions on a laptop. The laptop is constantly connected to the power supply. Or maybe it has something to do with the temperature of the laptop? However, I do not believe that a laptop with a powerful new processor is worse than 10-year-old cpu.

Should I make the settings using app-laptop/laptop-mode-tools or what is the best option?

Kernel: 6.11.10-gentoo-dist (sys-kernel/gentoo-kernel)
System is up to date
GUI: X11 / wm awesome with eloging starting in boot

Edit:
Quote:
To make use of Intel's Linux thermal daemon you first need to emerge sys-power/thermald and enable it via:

https://wiki.gentoo.org/wiki/Power_management/Guide/de

Quote:
thermald is a Linux daemon used to prevent the overheating of platforms. This daemon monitors temperature and applies compensation using available cooling methods.

By default, it monitors CPU temperature using available CPU digital temperature sensors and maintains CPU temperature under control, before HW takes aggressive correction action.

archlinux.org

I installed themald and added it via rc-config. I will compile again and see what the result will be.
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 128

PostPosted: Sat Nov 23, 2024 7:10 pm    Post subject: Reply with quote

Same result with sys-power/thermald. I gues I'll just have to try laptop-mode-tools.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sat Nov 23, 2024 7:42 pm    Post subject: Reply with quote

How much RAM has your old i7 and your new notebook?
_________________
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: 128

PostPosted: Sat Nov 23, 2024 8:00 pm    Post subject: Reply with quote

Old i7 desktop: 32 GB
New Ultra 7 notebook: 96 GB
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sat Nov 23, 2024 9:32 pm    Post subject: Reply with quote

nxe9 wrote:
New Ultra 7 notebook: 96 GB

Okay ... should be reasonably sufficient. :lol:

So, yes, the next you should check is the temperature.
_________________
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: 128

PostPosted: Sun Nov 24, 2024 2:22 am    Post subject: Reply with quote

So far I have installed themald and laptop_mode. Both are added with rc-update. Laptop_mode has default configuration. Still the same, firefox needs the same amount of time.

I ran the 7z benchmark on Windows and Gentoo and on windows the results are much better.The average MIPS for compressing / decompressing are about 70000 on windows whereas about 42500/25000 (compressing / decompressing) on gentoo. What I noticed is that in the case of 7z htop shows the cpu in green instead of blue.

I don't know what to do next. It looks like the laptop with is not working at full capacity.

/etc/laptop-mode/laptop-mode.conf contains the default value
Code:
ENABLE_LAPTOP_MODE_ON_AC=0

So I guess in my case laptop mode does not start and the kernel is controlling it its own way, right? Perhaps I should change this value? But the comment is
Quote:
Enable laptop mode power savings, even when on AC power.


I would expect "=0" means laptop mode is off and I don't understand why the kernel would make any throttling when I have a cable connected and no laptop mode.

Edit:
Code:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
...
<22 times>

Scaling governor seems to be ok for me.

Edit 2:
What about https://wiki.gentoo.org/wiki/Portage_niceness ? Can I adjust something with niceness?

Edit 3:
All cores are <60 C during firefox compilation and hight/crit values listed by sensor are +110 C.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sun Nov 24, 2024 11:37 am    Post subject: Reply with quote

I would like to have a look at the output of “dmesg” (complete) from your notebook; and of “dmesg | grep Bogo” from your i7.
_________________
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: 128

PostPosted: Sun Nov 24, 2024 2:02 pm    Post subject: Reply with quote

desktop i7:
Code:
dmesg | grep Bogo
[    0.150403] Calibrating delay loop (skipped), value calculated using timer frequency.. 7997.41 BogoMIPS (lpj=3998708)
[    0.168556] smpboot: Total of 8 processors activated (63979.32 BogoMIPS)


notebook ultra i7
Code:
dmesg | grep Bogo
[    0.282190] Calibrating delay loop (skipped), value calculated using timer frequency.. 5992.00 BogoMIPS (lpj=9984000)
[    0.325559] smpboot: Total of 22 processors activated (131841.00 BogoMIPS)


notebook ultra i7 full dmesg
https://bpa.st/VFZA
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sun Nov 24, 2024 3:50 pm    Post subject: Reply with quote

nxe9 wrote:
[...] What about https://wiki.gentoo.org/wiki/Portage_niceness ? Can I adjust something with niceness? [...]

Yes, you can ... slow down emerge :lol:

nxe9 wrote:
I don't know what to do next. It looks like the laptop with is not working at full capacity.
[...]
All cores are <60 C during firefox compilation and hight/crit values listed by sensor are +110 C.

That's what tells me something is wrong and that's why I wanted to see the system log to be on the safe side; and because you are using our dist-kernel everything is fine - as I expected. If the CPU temperature is 60°, then the CPU is not working at 100% ... or has been throttled. If the kernel is innocent, then only the BIOS remains to blame. Yes, I know that some notebook manufacturers install nasty limits here so that their (poor) heat dissipation is sufficient. Yes, some notebook manufacturers even go so far as to differentiate in the BIOS whether a Windows or an “other OS” is booted ...

You probably already know that you have 6 P-cores, 8 E-cores and 2 low-power E-cores. What happens if you use makeopts=“-j20” (instead of 22)? Have you looked in the BIOS settings to see what you can configure there?

You probably already know that with 96 GB you probably have 4 RAM bars (so access is always slower than with 2 bars) ... some BIOS even have problems here and a significant drop in memory access.

It could be that you have to live with the current performance ... :(
_________________
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: 128

PostPosted: Sun Nov 24, 2024 4:06 pm    Post subject: Reply with quote

After purchasing, I immediately updated the bios via Windows. I currently have the latest bios version.

I don't really believe that the fault is in the BIOS, because why there are much better 7z benchmark results on Windows?

There is 2x48 GB RAM.

What really surprises me is the fact that on the desktop all kernels are green in htop. On the notebook, however, they are all blue. It looks like the kernel doesn't want to run these threads with full priority. However, I don't know why.

Next steps I will take:
1. makeopts -j20
2. Review the bios settings
2. Try 7z benchmark on arch live usb.
3. Try 7z benchmark on ubuntu live usb.

I will tell you about the result

Edit:
4. I can also try to run arch live usb, chroot into gentoo and build firefox again. In this case, the compilation will be with the Arch kernel, so it is also interesting what the result will be.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sun Nov 24, 2024 4:15 pm    Post subject: Reply with quote

Yes, a comparison with another distribution can help to shed light on the situation.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
keekkenen
n00b
n00b


Joined: 05 Oct 2024
Posts: 9

PostPosted: Sun Nov 24, 2024 5:13 pm    Post subject: Reply with quote

I think we can't to use BogoMIPS for any comparing. It's non sense.
_________________
7950x3d / x670e MSI Tomagawk / Sapphire RX 7800XT 16Gb / G.Skill 64Gb 5600 / A-Data Legend 960 2Tb (x2), A-Data SX8200PNP 256Gb
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Sun Nov 24, 2024 5:49 pm    Post subject: Reply with quote

Yes, I know what BogoMIPS is and what it is not ... https://en.wikipedia.org/wiki/BogoMips ;-)
_________________
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: 128

PostPosted: Sun Nov 24, 2024 10:55 pm    Post subject: Reply with quote

I will now report on the current status.

1. MAKEOPTS="-j20"
Comparable time, same temperatures, low cpu status in htop. It didn't solve the problem.

2. 7zip benchmark on arch linux live usb (6.10.10)
Similar results to gentoo, much worse than on windows.

3. firefox compilation on arch live usb after chroot to gentoo.
Similiar result to native gentoo, comparable time, same temperatures, low cpu status in htop. It didn't solve the problem.

What's next?

- I will check 7z benchmark on ubuntu live cd.

- Change UEFI settings.

Perhaps you can advise me on UEFI settings? I am posting a simulator of my UEFI where all options are shown. You don't need to download anything. It works from your browser.
Code:
https://download.lenovo.com/bsco/index.html#/graphicalsimulator/ThinkPad%20E14%20Gen%206%20Intel%20(21M7,21M8)

If you click on the option, there is a description there.

The settings in the simulator in the config tab are default, the same as mine.

I'm thinking of disabling the following options
- CPU Power management
- Cool & Quiet on Lap
- Energy Efficient Turbo - Not listed in the simulator!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Mon Nov 25, 2024 12:46 am    Post subject: Reply with quote

nxe9 wrote:
I will now report on the current status.

2. 7zip benchmark on arch linux live usb (6.10.10)
Similar results to gentoo, much worse than on windows.

3. firefox compilation on arch live usb after chroot to gentoo.
Similiar result to native gentoo, comparable time, same temperatures, low cpu status in htop. It didn't solve the problem.

I expected that, because our dist-kernel is configured very correctly.

nxe9 wrote:
What's next?

- I will check 7z benchmark on ubuntu live cd.

Yes, but I expect something similar there too. I don't know how meaningful this benchmark is if you run it on different operating systems (Windows/Linux).

nxe9 wrote:
Perhaps you can advise me on UEFI settings? [...]

I'm thinking of disabling the following options
- CPU Power management
- Cool & Quiet on Lap
- Energy Efficient Turbo - Not listed in the simulator!

Yes, try it ... but ... I'm afraid I can't help any further ... only the settings that are allowed for a Windows user are permitted ...

maybe a user who has more experience with Thinkpads will jump in here ... :?:
_________________
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: 128

PostPosted: Mon Nov 25, 2024 1:29 am    Post subject: Reply with quote

I changed following UEFI settings:
- Intel SpeedStop Technology -> Off
- Scheme for Battery Balanced -> Maximal Performance (I am working on AC however, I changed the setting just in case)
- Energy Efficient Turbo -> Off
- CPU Power Managment -> Off
- Cool & Quiet on Lap -> Off

Same result. Now I will run some cpu benchmarks on ubuntu and windows and compare temperatures etc. So far, I haven't seen a temperature higher than 62 C on the cpu cores with gentoo. I wonder if it will be different on Windows.

If anyone has a new Thinkpad, I'd love to know what it looks like for you.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1290
Location: Richmond Hill, Canada

PostPosted: Mon Nov 25, 2024 2:45 pm    Post subject: Reply with quote

Just want to bring to attention. Does both machine have same scheduler?

On my ARM nodes I have several have scheduler fixed using "powersave" which exhibiting the behaviour you described. temperature never rose to above some 60C.
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 128

PostPosted: Mon Nov 25, 2024 6:36 pm    Post subject: Reply with quote

@pingtoo:
Code:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

tells me "performance" on both systems for each kernel (22x performance on laptop and 8x performance on desktop).

Or do you mean something different?
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1290
Location: Richmond Hill, Canada

PostPosted: Mon Nov 25, 2024 7:12 pm    Post subject: Reply with quote

nxe9 wrote:
@pingtoo:
Code:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

tells me "performance" on both systems for each kernel (22x performance on laptop and 8x performance on desktop).

Or do you mean something different?
No, that is what I am asking. Just that I did not saw any mention in previous posts.
Back to top
View user's profile Send private message
nxe9
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2021
Posts: 128

PostPosted: Tue Nov 26, 2024 7:54 pm    Post subject: Reply with quote

I have some new information.

First of all from what I see CPU usage is green in htop for some packages like nodejs or chromium. Maybe it depends on the compiler or something else. I guess it doesn't matter too much.

I tried cpu sysbench on ubuntu and gentoo. similar results and similar temperatures on both systems.

I did some stress tests on Windows and there is also no very high temperature there. Generally, there are single peaks above 70 C, but as a rule the temperature during load is somewhere around 60. Such peaks also appeared on Ubuntu and Gentoo.

So it looks as if, on the one hand, everything is fine and consistent. However, I'm disappointed, an example:
nodejs merge time:
12 years old i7 3612QM notebook cpu: ~1 h 45 min
new Ultra 7 155H: ~1 h 25 min

I know that I didn't buy a gaming notebook, but a budget and business one, but I'm negatively surprised that the difference is so small.

My new notebook has a 65 watt charger. Ultra 7 155H has 28 Watt TDP (Base), 64 Watt and. 115 Watt (PL2) max. Turbo Power mode. Perhaps Lenovo has limited its capabilities in terms of hardware and I have a powerful processor, but the laptop only works with part of the power?

Hardware unrelated benchmarks on the Internet show that Ultra 7 155H is more powerful than i7 4790k and my real example shows me a completely different view. Unfortunately, I do not have any representative and real data to compare my observations.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Tue Nov 26, 2024 10:43 pm    Post subject: Reply with quote

nxe9 wrote:
[...] However, I'm disappointed, an example:
nodejs merge time:
12 years old i7 3612QM notebook cpu: ~1 h 45 min
new Ultra 7 155H: ~1 h 25 min. [...]

I usually don't know how long individual packages take, because I run my world-update once a week at night (and because I'm asleep I don't care how long it takes; yes, I don't even use all my 32 cores because I'd rather spare the fans) ... I just ran it twice now to see the differences: Once with makeopts=j16 and then with j24 (my i9-13900K has 24 physical cores and with SMT 32). The differences are not as big as expected:
Code:
# time emerge -1v nodejs

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.02 s (backtrack: 0/20).

[ebuild   R    ] net-libs/nodejs-22.4.1-r1:0/22::gentoo  USE="icu npm snapshot ssl system-icu system-ssl -corepack -debug -doc -inspector (-lto) -pax-kernel -test" CPU_FLAGS_X86="sse2" 0 KiB

--------------------------------------------------------------------------

>>> Completed (1 of 1) net-libs/nodejs-22.4.1-r1::gentoo

 * Messages for package net-libs/nodejs-22.4.1-r1:

 * remember to run: source /etc/profile if you plan to use nodejs
 *  in your current shell

 * GNU info directory index is up-to-date.

real    12m27,177s



>>> Completed (1 of 1) net-libs/nodejs-22.4.1-r1::gentoo

 * Messages for package net-libs/nodejs-22.4.1-r1:

 * remember to run: source /etc/profile if you plan to use nodejs
 *  in your current shell

 * GNU info directory index is up-to-date.

real    10m22,129s

_________________
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: 128

PostPosted: Tue Nov 26, 2024 11:13 pm    Post subject: Reply with quote

genlop is very helpful to track emerge time.

i9-13900K is a completely different level. It's a powerful desktop processor that outclasses laptop cpu.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5161
Location: Bavaria

PostPosted: Wed Nov 27, 2024 12:19 am    Post subject: Reply with quote

nxe9 wrote:
genlop is very helpful to track emerge time.

i9-13900K is a completely different level. It's a powerful desktop processor that outclasses laptop cpu.

Yes ... I know that it is a completely different level ... but it can show also the difference between 16 and 24 cores ... AFAIR you said you have 22 cores ... so, I guess, the difference between 22 and e.g. 16 should not be so great also. If you had with your old i7 "only" 8 cores you could test your new machine also with 8 cores to see the difference.
_________________
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: 128

PostPosted: Wed Nov 27, 2024 4:04 pm    Post subject: Reply with quote

Pietinger, thanks, I see now what you mean.

I tried MAKEOPTS="-j8" on my new notebook and there is practically no difference between 22 and 8 during firefox and nodejs compilation. Very strange...

My cpu contains 12 performance threads, 8 efficient threads and 2 low power threds. So I would expect at least a noticeable deterioration on 8 threads. Perhaps the compilers are not yet optimized for my hardware? however, I can clearly see the differences in htop. At -j8 I see that fewer threads are actually loaded. At -j22 I see the full load.
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
Page 1 of 1

 
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