View previous topic :: View next topic |
Author |
Message |
PexoHundido69 n00b
Joined: 18 May 2022 Posts: 3 Location: Spain
|
Posted: Wed May 18, 2022 10:54 pm Post subject: Question about MAKEOPTS when compiling on RAM (tmpfs) |
|
|
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 |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3876
|
Posted: Wed May 18, 2022 11:04 pm Post subject: |
|
|
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 |
|
|
PexoHundido69 n00b
Joined: 18 May 2022 Posts: 3 Location: Spain
|
Posted: Wed May 18, 2022 11:22 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3876
|
Posted: Wed May 18, 2022 11:26 pm Post subject: |
|
|
May be 4 jobs would be even safer.
Otherwise plz make sure you have a lot of swap space also. _________________
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Thu May 19, 2022 3:44 pm Post subject: |
|
|
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 |
|
|
|