r/voidlinux • • Oct 25 '26

Is this normal while building packages?

Post image

Iam building some packages from Source, all my CPU is used. Is it possible to setup that not everything should be used for building in xbps ?

54 Upvotes

30 comments sorted by

33

u/Saba_Kupatadze_2014 Oct 25 '26

Yes building which is called compiling uses ur CPU a lot and sometimes ram too l, be sure to only make ur setup focus on the compiling

-6

u/Silly_Culture_7722 Oct 25 '26

yeah i understand whats compiling is, but all of my CPUs are used? when i compile stuffs from docker for example i can tell that not all avalialbe cpus should be used. i wonder if i have a missing parameter

5

u/StrangerFantastic392 Oct 25 '26

Docker shares the cpus across the containers. If you compile using all cores and threads on your host, all cores and threads on that system will be used

9

u/Available-Attorney74 Oct 25 '26

Yeah, just google flags for your compiler

6

u/Silly_Culture_7722 Oct 25 '26

ah okay so you can actually configure it. thx

2

u/Hot-Fridge-with-ice Oct 28 '26

Hand over some of that RAM

1

u/Silly_Culture_7722 Oct 28 '26

thats just my little notbook :D my PC sits at 128GB :D

6

u/neoSnakex34 Oct 25 '26

Yes and the temps seems average for such a job. I had to repaste a laptop because at full load while compiling cpu reached 100 C°

2

u/chibiace Oct 25 '26

i wonder if ryzen laptop cpus are like my 7900x which is happy to sit just under 90c.

1

u/maokaby Oct 25 '26

With good thermal interface it drops to 75-78C. Also i'd say 30W is not default value for long high load tasks. At 15W load it would drop to 70C.

4

u/Ok-Tip-6972 Oct 25 '26

You can limit the number of processes given to the build system in https://github.com/void-linux/void-packages/blob/e96572b8c66da1c669b6ed167260e5fd2b32b6f1/etc/defaults.conf#L65-L70. But not all packages implement it properly.

Other than that, I think you should be able to use generic tools to limit CPU usage of xbps-src, like cpulimit or cgroups. But I don't know whether they would work without intervention, since there's isolation involved. I have never tried it.

1

u/Duncaen Oct 25 '26

But not all packages implement it properly.

I can't think of a single package that doesn't use the defined makejobs (unless its just using 1 core).

1

u/cafe_zgok Oct 25 '26

VoidLinux is not Gentoo.
Don't let VoidLinux become Gentoo. lol

2

u/Silly_Culture_7722 Oct 25 '26

yeah since noctalia and noctalia greeter is not merged and mangowc is not up to date and crush is not merged, i have to build those packages for myself :P

1

u/Burny_312 Oct 25 '26

I know it's not the topic, but what program is that?

1

u/IllustriousHurry5966 21d ago

Yo, cool setup what WM manager do you use? and your top bar/statusbar is very clean looking what do you use for that? šŸ™‚

2

u/Silly_Culture_7722 21d ago

its just MangoWC + Noctalia v5

1

u/IllustriousHurry5966 21d ago

Do you use your own config dotfiles?

2

u/Silly_Culture_7722 21d ago

https://github.com/BlackScorp/dotfiles/blob/main/.local/state/noctalia/settings.toml well not really i configured it over ui but made a backup on my github

2

u/Duncaen Oct 25 '26

xbps-src -j8 to limit the number of make jobs during the build.

2

u/GhostVlvin Oct 25 '26

Depends on what you build. Cargo takes a lot of CPU and RAM resource cause rust has many features and dependencies

2

u/Lumpy_Roll158 Oct 26 '26

If you run 'nproc', you'll get the total number of threads your cpu has. That number is what most compilation tasks default to. If you've ever compiled before and it used less than nproc, its because that particular job had a predefined -j variable or docker in particular was limiting the allocated threads inside the container for use. Like 99% of compilation jobs will default to -j$(nproc). You can override it by passing -j(number of threads to use) in the build invocations command.

2

u/paper42_ Oct 27 '26

yes, but it's also possible your clone of void-packages is too old, so xbps-src is building a lot of old dependencies it shouldn't

2

u/Lepzalo Oct 28 '26

Yes, compilation is a CPU intensive task.

2

u/1saltypistachio Oct 28 '26

Me, a Gentoo user, nods.