Mailing List Archive

PORTAGE_NICENESS is not so nice...
So I set PORTAGE_NICENESS to 19 in /etc/make.conf on my primary gentoo
desktop so I could do emerges in the background and still use my box...

Well tonight I emerged boost... The system maxed out and ran that way for an
hour without looking like it was going to complete anytime soon. Which
wouldn't have been so bad if the system wasn't pegged to the point of being
totally unresponsive under X.

I eventually killed it and system load dropped back to normal. Commented out
the PORTAGE_NICENESS value and emerged boost again.

This time the system pegged again, but the whole process was finished in 10
minutes.

So I'm starting to question how useful PORTAGE_NICENESS actually is... If
the system is pegged under niceness 19 and 0, but 0 completes in 10 minutes,
why would PORTAGE_NICENESS benefit me in any way?
--
gentoo-dev@gentoo.org mailing list
Re: [OT] PORTAGE_NICENESS is not so nice... [ In reply to ]
I *think* it should go to user mailing list, forums, or somewhere else
where it's not [OT].

On Mon, 2005-10-24 at 06:47 -0400, Dave Nebinger wrote:
> So I set PORTAGE_NICENESS to 19 in /etc/make.conf on my primary gentoo
> desktop so I could do emerges in the background and still use my box...
> [...]
> So I'm starting to question how useful PORTAGE_NICENESS actually is... If
> the system is pegged under niceness 19 and 0, but 0 completes in 10 minutes,
> why would PORTAGE_NICENESS benefit me in any way?
nice, renice, PORTAGE_NICENESS (they're all the same) affect the way
kernel allocates CPU resources for running processes. Under normal
operating conditions, nice'd processes will get less CPU time (with nice
-n 19 ~1% of nice -n 0) than remaining nice 0 desktop processes.

It is possible to run CPU intensive jobs with 98% of CPU time when
other, competing processes are "nice". Basically, kernel will get the
nice processes out of the way if something else wants the CPU (not
completely, look around kerneltrap.org to see how exactly it works in
different schedulers)

What probably happened in your case was you run out of RAM. Than, your
machine started to use VERY slow swap space to run applications from,
and it may render some RAM-hogs (kde, e17, gnome) unresponsive. If you
are running an memory limited box, you may consider getting rid of -pipe
from CFLAGS, and setting MAKEOPTS="-j1". No niceness would help if your
system is waiting for swap space accesses.

Or just buy more RAM. Modules are getting ridiculusly cheap compared to
prices from last two years. I'd consider extra 128-256M for each thread,
you use to emerge stuff from, sufficient. And with linux using memory
very efficiently, more won't hurt either (and will likely decrease
application startup times significantly).

Tomasz
Re: PORTAGE_NICENESS is not so nice... [ In reply to ]
Dave Nebinger posted <200510240647.16996.dnebinger@joat.com>, excerpted
below, on Mon, 24 Oct 2005 06:47:16 -0400:

> I eventually killed it and system load dropped back to normal. Commented out
> the PORTAGE_NICENESS value and emerged boost again.
>
> This time the system pegged again, but the whole process was finished in 10
> minutes.

Note that if you use ccache or the like, and it was fairly close to
completion when it was killed, the 10 minute emerge wouldn't be unusual in
any case, because it wasn't redoing all that work compiling, but simply
pulling it out of ccache.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


--
gentoo-dev@gentoo.org mailing list