Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Run the steps in the handbook at a lower priority?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
genialePrutser
n00b
n00b


Joined: 28 Jul 2023
Posts: 11

PostPosted: Sat Jul 29, 2023 2:27 pm    Post subject: Run the steps in the handbook at a lower priority? Reply with quote

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
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4159
Location: Bavaria

PostPosted: Sat Jul 29, 2023 2:53 pm    Post subject: Re: Run the steps in the handbook at a lower priority? Reply with quote

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
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1660

PostPosted: Sat Jul 29, 2023 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
genialePrutser
n00b
n00b


Joined: 28 Jul 2023
Posts: 11

PostPosted: Sun Jul 30, 2023 5:00 am    Post subject: Reply with quote

"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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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