View previous topic :: View next topic |
Author |
Message |
genialePrutser n00b
Joined: 28 Jul 2023 Posts: 11
|
Posted: Sat Jul 29, 2023 2:27 pm Post subject: Run the steps in the handbook at a lower priority? |
|
|
I have just finished the Handbook:AMD64. As expected, it took some time for my machine to compile everything. I have used this command to let the compile processes take a lower priority, so the machine was still responsive:
Code: | # nice -n 19 bash
# <the normal emerge steps> |
Would it be useful / acceptable if I add this to the handbook with the stipulation that running heavy programs slows down the compile steps? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5354 Location: Bavaria
|
Posted: Sat Jul 29, 2023 2:53 pm Post subject: Re: Run the steps in the handbook at a lower priority? |
|
|
genialePrutser wrote: | [...] to let the compile processes take a lower priority, so the machine was still responsive |
Usually it is easier to reduce the number of CPU cores which compiles your packages. This you do with MAKEOPTS= in your make.conf.
If you have an 8 core CPU you can use MAKEOPTS="-j8" (takes 100 % CPU workload) ... OR a lower value; e.g. with MAKEOPTS="-j4" only 4 cores will be used.
Another solution is described here: https://wiki.gentoo.org/wiki/Portage_niceness |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 2000
|
Posted: Sat Jul 29, 2023 7:07 pm Post subject: |
|
|
While this is mostly useless during install, since most people are only using a single window anyway, there are more documented tools to control emerge than running bash via nice.
See PORTAGE_SCHEDULING_POLICY and PORTAGE_NICENESS in man make.conf for general priority for things under emerge.
I've personally never seen a "slow down" in compiles during install even with insane settings in MAKEOPTS or emerge jobs. Modern Linux scheduling is really good to prevent this in 99% of cases. Some terminal output could perceive a "slow down", but using --quiet-build or --jobs stops that. |
|
Back to top |
|
|
genialePrutser n00b
Joined: 28 Jul 2023 Posts: 11
|
Posted: Sun Jul 30, 2023 5:00 am Post subject: |
|
|
"While this is mostly useless during install, since most people are only using a single window anyway"
When I installed my system, I used the Livegui USB image. This allowed me to browse the web, and do a lot of other stuff while installing. While I'm probably not most people, I did have a lot of windows open.
"Usually it is easier to reduce the number of CPU cores which compiles your packages."
This guarantees the compilation is slower, while the cores that are not compiling can be idle if the user doesn't run programs that use them. I agree it's easier, and I have seen it work in the chroot environment of the Livegui USB image.
"Another solution is described here: https://wiki.gentoo.org/wiki/Portage_niceness"
Thank you for the wiki link. I didn't get it to work in the chroot environment of the Livegui USB image yet, but I'll give it another try. |
|
Back to top |
|
|
|