this post was submitted on 08 Jul 2024
152 points (97.5% liked)

Linux

5237 readers
113 users here now

A community for everything relating to the linux operating system

Also check out !linux_memes@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] SorteKanin@feddit.dk 0 points 4 months ago (4 children)
[–] QuadriLiteral@programming.dev 2 points 4 months ago* (last edited 4 months ago) (3 children)

If you don't want compilation to take all cores, use one or two cores less for the compile. I frequently compile C++ code, almost always I just let it max out 100%, haven't been really bothered by the lag. When I'm in a teams meeting for instance it can cause noticable lag so then I do ninja -n 8 or ninja -n 12 and problem solved.

[–] SorteKanin@feddit.dk 3 points 4 months ago (2 children)

I have actually tried this solution as well and I had to reduce the compilation jobs to like 4 (usually would be 16 with my 16 logical cpus) before it helped any. That is simply too much of a reduction to be worth it, it makes compilation take ages.

And in the end, that's still just a workaround to the more general problem that is the fact that the desktop environment and user input is not prioritised in the scheduler, when it really should. I really want Linux to succeed so it pains me to see Windows do better in this situation.

[–] QuadriLiteral@programming.dev 2 points 4 months ago (1 children)

Huh odd, I guess it depends quite heavily on the system? Just to check I cleaned my build folder and am building now, ~700 files that take around 5 minutes to compile. I don't notice a thing, CPU (Ryzen 7 7700X ) is fully maxed out. I know that I do notice it on my laptop, but there reducing from 16 to 12 or even 14 is enough. Having to reduce to 4 is very different from what I experience. Currently on manjaro, the laptop has ubuntu.

[–] SorteKanin@feddit.dk 1 points 4 months ago

Hmm curious. I guess I might need to investigate more