[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Niced cron jobs

On Wed, Jun 23, 1999 at 10:46:26PM +0200, Norbert Nemec wrote:
> On Wed, Jun 23, 1999 at 01:56:11PM -0500, David Welton wrote:
> > To reiterate, the plan is to nice cron jobs, so that when anacron or
> > similar programs run, they don't slow down the system too awfully
> > much.  The only negative brought up was that Debian shouldn't be
> > futzing with the defaults, which doesn't really seem to hold water,
> > because Debian does this all over the place (ipfwadm rules in the
> > networking scripts, for instance).
> I'm full in favor of the idea. I think it is so reasonable that it
> should be default from the beginning. I followed the thread, too, and
> I couldn't see a single *real* reason against it. If anybody has any
> technical reason why any user would not want to have the cron-jobs run
> niced, please speak up.

niced cron jobs be a disastrous on heavily loaded servers that never
have any idle time to service the niced jobs. you can end up with
several cron jobs running simultaneously, some of them sucking up
massive amounts of memory (e.g. calamaris running on a squid box or
analog on a web server) and slowing the system down even further. you
can end up with the cron jobs from several days running simultaneously,
which complicates things even more (most cron jobs are written with the
assumption that only one instance will be running at a time, which can
cause locking or other contention problems)

this is not just speculation, it's experience. i've seen it happen
because i've tried it myself. i thought that nicing the cron jobs would
result in a performance boost, smooth out the load. what actually
happens is that the load goes through the roof and can bring down the
machine due to resource starvation.

In summary, using 'nice' in such a simplistic catch-all fashion doesn't
provide the benefits that you might think it does. the dangers far
outweigh the potential benefits.

nice is a useful tool, but it should be used with deliberation.

> Anyway - making a distribution is 90% about trying to find a
> reasonable, flexible default configuration so the users have as little
> work as possible to put together a well-configured system for their
> use.

this is a good reason why we shouldn't nice the cron jobs by default.

it might be worthwhile trialling it on workstations which use anacron,
but i think it would be disastrous to do it for machines which are up

> -- ______________________________________________________
> --          To Him, even that machine here has to obey...

let's make a deal: you don't advertise your god and i wont advertise any
of mine :)


craig sanders

Reply to: