Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about MAKEOPTS when compiling on RAM (tmpfs)
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
PexoHundido69
n00b
n00b


Joined: 18 May 2022
Posts: 3
Location: Spain

PostPosted: Wed May 18, 2022 10:54 pm    Post subject: Question about MAKEOPTS when compiling on RAM (tmpfs) Reply with quote

I just got a new system up and running. It's a 16 core CPU with 16 gigs of ram, it has a relatively small NVME drive (256G).

I know nowdays write limits shouldn't be a problem with good NVME's, but I'm the kind of guy who upgrades his pc every 10 years, so just for good measure I want to try compiling on RAM.

I gave tmpfs 14 Gigs on the fstab file, which should be plenty enough for the "biggest" packages. However, my MAKEOPTS variable is set to 8 in the make.conf. I haven't been able to find much info on how simultaneous compiles are handled in these situations, but could it be that simultaneously compiling packages would exceed the limit? For example, if I'm compiling a package that takes 10 gigs, will portage take care to compile simultaneously packages that are less than 4 gigs, or is it possible that it can throw in another 10 gig package causing a failure?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3876

PostPosted: Wed May 18, 2022 11:04 pm    Post subject: Reply with quote

Welcome to Gentoo Forums.
They say one should allocate 1.5-2G for each thread.
Then you will need some space for compile files etc.
Maybe you are ok although reducing a bit the number of jobs would be better IMHO.
Quote:

if I'm compiling a package that takes 10 gigs, will portage take care to compile simultaneously packages that are less than 4 gigs, or is it possible that it can throw in another 10 gig package causing a failure?

No after a package is finished tmpfs will be cleaned ie all temporary files belonging to said package will be deleted and then another one will start compiling.
Number of parallel jobs does not mean compiling 2 or more different packages at the same time but applying more threads to the package currently being built.
_________________
:)
Back to top
View user's profile Send private message
PexoHundido69
n00b
n00b


Joined: 18 May 2022
Posts: 3
Location: Spain

PostPosted: Wed May 18, 2022 11:22 pm    Post subject: Reply with quote

alamahant wrote:
Welcome to Gentoo Forums.
They say one should allocate 1.5-2G for each thread.
Then you will need some space for compile files etc.
Maybe you are ok although reducing a bit the number of jobs would be better IMHO.
Quote:

if I'm compiling a package that takes 10 gigs, will portage take care to compile simultaneously packages that are less than 4 gigs, or is it possible that it can throw in another 10 gig package causing a failure?

No after a package is finished tmpfs will be cleaned ie all temporary files belonging to said package will be deleted and then another one will start compiling.
Number of parallel jobs does not mean compiling 2 or more different packages at the same time but applying more threads to the package currently being built.


Woah, I've been thinking for the longest time that it used different threads to compile different packages. Guess I will set it to 6 threads for now hehe.
Thank you very much for taking the time to answer! appreciate it :mrgreen:
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3876

PostPosted: Wed May 18, 2022 11:26 pm    Post subject: Reply with quote

May be 4 jobs would be even safer.
Otherwise plz make sure you have a lot of swap space also.
_________________
:)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21518

PostPosted: Thu May 19, 2022 3:44 pm    Post subject: Reply with quote

There are two levels of parallel support here. MAKEOPTS permits a single package to run multiple jobs at once. Separately, emerge can be told to run multiple packages at once. You can enable both of these, and then the system will run multiple packages, and each package can use up to MAKEOPTS jobs at once. Portage does not naturally limit package level parallelism to fit within the available resources, which is why we instead advise people about how aggressively to configure Portage. Some ebuilds have spot checks for available resources, but those could be defeated if all of them check, find it satisfied, then all start their heavy work.
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