Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I set nice value of emerge build with MAKEOPTS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
KintaroBC
n00b
n00b


Joined: 15 Feb 2014
Posts: 63
Location: Australia

PostPosted: Thu Mar 27, 2014 8:08 am    Post subject: Can I set nice value of emerge build with MAKEOPTS? Reply with quote

I run a server and running emerge can really make my users PHP sites crawl, and severely increase the load averages on the system. I was wondering if there is a way to use MAKEOPTS to set a nice value to lower the priority of compiler tasks when I emerge packages. If this can be done, I'd really like to know how to do it.
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8708
Location: ~Brussels - Belgique

PostPosted: Thu Mar 27, 2014 8:25 am    Post subject: Reply with quote

Hello,

There is a PORTAGE_NICENESS variable to set in make.conf.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 27, 2014 8:54 am    Post subject: Reply with quote

KintaroBC ...

to follow on from what XavierMiller has said ... you can also adjust IONICE via PORTAGE_IONICE_COMMAND ... eg:

Code:
PORTAGE_IONICE_COMMAND="ionice -c 3 schedtool -D \${PID}"

best ... khay
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Thu Mar 27, 2014 8:58 am    Post subject: Reply with quote

You can also set the load-average threshold

man emerge, and search for load-average

If it's a multicore processor you can also adjust the "jobs" downward in MAKEOPTS
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Thu Mar 27, 2014 9:08 am    Post subject: Reply with quote

And, even more efficient, set the scheduling model to SCHED_IDLE.
_________________
Back to top
View user's profile Send private message
KintaroBC
n00b
n00b


Joined: 15 Feb 2014
Posts: 63
Location: Australia

PostPosted: Thu Mar 27, 2014 3:02 pm    Post subject: Reply with quote

Thanks for all the useful tips in this thread.

Looking into them I've found a lot of options in the manual for make.conf - so this is very appreciated. It's good to use a distro where the community helps users learn rather than just wet nursing their systems like some other distro communities. :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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