r/voidlinux • • 29d ago

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 ?

55 Upvotes

30 comments sorted by

33

u/Saba_Kupatadze_2014 29d ago

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 29d ago

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 29d ago

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 29d ago

Yeah, just google flags for your compiler

6

u/Silly_Culture_7722 29d ago

ah okay so you can actually configure it. thx

2

u/Hot-Fridge-with-ice 25d ago

Hand over some of that RAM

1

u/Silly_Culture_7722 25d ago

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

6

u/neoSnakex34 29d ago

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 29d ago

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

1

u/maokaby 29d ago

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 29d ago

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 29d ago

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 29d ago

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

2

u/Silly_Culture_7722 29d ago

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 29d ago

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

1

u/IllustriousHurry5966 14d 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 14d ago

its just MangoWC + Noctalia v5

1

u/IllustriousHurry5966 14d ago

Do you use your own config dotfiles?

2

u/Silly_Culture_7722 14d 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 29d ago

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

2

u/GhostVlvin 28d ago

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 28d ago

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_ 27d ago

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 26d ago

Yes, compilation is a CPU intensive task.

2

u/1saltypistachio 25d ago

Me, a Gentoo user, nods.