Subject: Re: To renice, or not to renice...
To: David Howland <metalliqaz@hotmail.com>
From: Timothy A. Musson <timothy.musson@zin-tech.com>
List: netbsd-help
Date: 03/05/2004 17:26:37
At 04:26 PM 3/5/04 , David Howland wrote:
>I use NetBSD at home as a NAT/Firewall/utility machine, running between my

>It runs great, no problems, except every 5 minutes on the dot, there is a
>big spike of lag in game for all connected clients.  Obviously, this is
>related to perl starting from cron to run MRTG.  I would rather quake3 get

I haven't deployed MRTG, but it seems there should be a way to have the
module or whatever is being run stay resident in memory. Or, you could turn
off MRTG ;)

>the cycles, so immediately I think about renicing quake3 to something
>negative.  Reading a few things online, I get the impression that doing so
>is bad, and should be avoided.  Why is this?  Should I find another way to
>keep the game latency low, and if so, how?
>Thanks in advance for any thoughts.
>-d

Well, from what I understand, a program will automatically have its nice
value adjusted to a little higher priority every time it is ready to run
but can't due to a higher priority process running (and I think the
converse happens, too). Of course, if the MRTG stuff is a cron job that
runs once and exits fairly quickly, it seems you could change the job to
set the nice level of the MRTG stuff to a low priority and it should be
done executing before the level is able to get back up to average priority.
So, by lowering the priority of the MRTG script, you don't have to deal
with trying to keep the quake3 server's priority high compared to all other
constantly running processes.

All you should have to do is add "nice -n15", or similar, to the beginning
of the command line called out by cron.

-Tim