Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Number of joob on very modern CPU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fbeth
n00b
n00b


Joined: 28 Feb 2023
Posts: 11

PostPosted: Mon Sep 02, 2024 10:20 am    Post subject: Number of joob on very modern CPU Reply with quote

Hello everybody,

After 8 years with my old laptop I decided it was time for an upgrade, I received the new computer today that has an Intel Core Ultra 7 155H. I looked at the specs online and it says that this CPU has 2 different type of cores : 6 Performance-cores and 8 Efficient-cores, for a total of 22 threads. I'm wondering if it's better to compile on 12 threads to only use the performance-cores or 22 to use all of them. If someone has experience with that kind of CPU I would be delighted if you could share about how you handle compilation. Please note that the computer has 32G of RAM so it won't be a problem for most packages.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1634
Location: Germany

PostPosted: Mon Sep 02, 2024 10:39 am    Post subject: Reply with quote

Not with the CPU, but keep in mind the RAM usage

Quote:
But another item to consider is RAM usage. Recent gcc versions have been known to take 1.5 GB to 2 GB of RAM per job. If the system has the 8 logical CPUs from the previous example, but only 4 GB RAM, the MAKEOPTS value should be lowered to -j2. This is so that the system has RAM to run the basics as well as compile without hitting swap very often slowing things down.

https://wiki.gentoo.org/wiki/MAKEOPTS
https://wiki.gentoo.org/wiki/Knowledge_Base:Emerge_out_of_memory
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4856
Location: Bavaria

PostPosted: Mon Sep 02, 2024 1:05 pm    Post subject: Reply with quote

fbeth,

Your CPU has 6 P-cores (12 logical cores with Intel "Hyperthreading" == SMT), 8 E-cores and 2 Low Power E-cores:
https://www.intel.com/content/www/us/en/products/sku/236847/intel-core-ultra-7-processor-155h-24m-cache-up-to-4-80-ghz/specifications.html

Normally the Linux kernel decides on which core it starts a new thread. Since I also have an i9-13900k (with 8 P-cores and 16 E-cores), I am very interested in how the kernel handles this. From the looks of it, it SHOULD be better under 6.11:
https://www.phoronix.com/news/Intel-P-State-Asymmetric-Cap
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
fbeth
n00b
n00b


Joined: 28 Feb 2023
Posts: 11

PostPosted: Tue Sep 03, 2024 6:41 pm    Post subject: Reply with quote

I've settled with 20 threads, everything seems good. I'm using kernel 6.11 currently because it's the first version that supports my sound card. I might do a few benchmarks later, but no promise.
Back to top
View user's profile Send private message
spica
Guru
Guru


Joined: 04 Jun 2021
Posts: 315

PostPosted: Tue Sep 03, 2024 10:05 pm    Post subject: Reply with quote

fbeth,

If you run -march=native, try to re-emerge gcc. If it succeds you're good now, otherwise you'll see something like this one https://www.reddit.com/r/Gentoo/comments/1bqjtyo/gcc_inconsistent_paraml1cachesize_on_12th_gen/
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4856
Location: Bavaria

PostPosted: Tue Sep 03, 2024 10:25 pm    Post subject: Reply with quote

spica wrote:
fbeth,

If you run -march=native, try to re-emerge gcc. If it succeds you're good now, otherwise you'll see something like this one https://www.reddit.com/r/Gentoo/comments/1bqjtyo/gcc_inconsistent_paraml1cachesize_on_12th_gen/

When using GCC 13.3 I think it would be better for PO to use: -march=meteorlake. (I use =raptorlake)
(using this was a recommendation of our developer)

(see also in chapter: IA-32/x86-64 of https://gcc.gnu.org/gcc-13/changes.html )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
fbeth
n00b
n00b


Joined: 28 Feb 2023
Posts: 11

PostPosted: Wed Sep 04, 2024 11:27 am    Post subject: Reply with quote

So I did a small benchmark, nothing to fancy or complex. The CPU is an Intel Core Ultra 7 155H and I compiled my current kernel (6.11.0-rc6) two times, the first time with -j12 and the second time with -j20.
I was only running alacritty inside KDE Plasma 6 with the ppower cord plugged in. If you need more info or if you have any ideas in order to make better tests, feel free to share it with me.

-j12: 6min 34s
-j20: 5min 55s

That's almost a 10% time difference, it's not huge considering I used 8 more cores, but it shows that the E-cores are not that useful during heavy CPU tasks. pietinger mentioned that the scheduler should be better under kernel 6.11, it looks like the scheduler is prioritizing the P-cores.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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