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

Re: Niced cron jobs



Craig Sanders wrote:
> 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.

That's very interesting. Did you try tuning the nice levels so it wasn't
quite *so* nice?

But consider this: Heavily loaded servers are rare. Most linux boxes (that
arn't running a niced client like distributed-net) are idle 99% of the time.
Heavily loaded servers that don't have an admin who can deal with a problem
caused by niced cron jobs are even rarer.

On the other hand, lightly loaded systems whose admin has no idea why their
disk starts thrashing and everything gets so slow are quite common.

Seems to me we should address the common case.

-- 
see shy jo


Reply to: