r/voidlinux • u/Silly_Culture_7722 • Oct 25 '26
Is this normal while building packages?
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
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
9
u/Available-Attorney74 Oct 25 '26
Yeah, just google flags for your compiler
2
u/Hot-Fridge-with-ice Oct 28 '26
Hand over some of that RAM
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°
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/cafe_zgok Oct 25 '26
VoidLinux is not Gentoo.
Don't let VoidLinux become Gentoo. lol
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/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.
1
u/Prestigious-Ebb1150 Oct 29 '26
yes.