/etc/cron.daily/apt hangs [deviated discussion]

Daevid Vincent daevid at daevid.com
Mon Feb 23 23:57:10 UTC 2009


On Tue, 2009-02-24 at 00:18 +0100, Markus Schönhaber wrote:

> Daevid Vincent:
> 
> > So when I expect all my cron.daily tasks to be running at a given time
> > in crontab, they're actually all delayed by some random amount. Since
> > it's name is alphabetically earlier than anything else in the directory,
> > this 'apt' holds up all the scripts below as they're not fired off in
> > threads. *sigh*
> 
> Hm, you're the first one I know of who expects jobs in cron.daily to be run 
> precisely at a given time.

I wouldn't say "precisely", however I don't expect some random delay
which looks like a hung task to muck up things on me.

> In my understanding jobs in cron.daily are to be 
> run once a day - whenever that may be throughout the day. And since those jobs 
> are executed sequentially, it's pretty obvious that any delay in one job (be 
> it caused by a sleep like in the apt script, a slow network or something else) 
> will affect the execution time of all following jobs.

True.

> If I want something to be executed precisely at a given time, I create a real 
> cron job for it.

Again. True.

> > "The random sleep was added to avoid that the big archive
> > servers/mirrors get hammered at exactly the same time when a lot of
> > machines are switched on, e.g. 9:00 in the morning. '
> >
> > Who "switches on" a Unix box??! They normally are running 24/7 right?
> 
> Interesting that you ask this question in an Ubuntu mailing list. Since IMO 
> Ubuntu's main success is based on the fact that it provides an easy to set up 
> *desktop* Linux.

I've been using Linux since it was Slackware on an Amiga 3000 and came
on 14 floppies.

I've used RedHat, CentOS, Gentoo, and various others as my servers too.

To me, Ubuntu is just a "more supported" and "prettier UI" with less
hassle version of Linux. In another few years, a new contender will come
along that's even better I'm sure.

RedHat pissed me off with their dependency hell in RPMs years ago. And
then the whole split to Fedora was messy at the time.

I switched to Gentoo, but I've grown VERY tired of re-compiling all the
time when the H/W server died, I decided it was time to jump ship to
Ubuntu Server (with the GUI added later) (ironic that now, my new Ubuntu
server is 4 procs and 4GB RAM and could handle it very nicely I
suspect).

> And my guess would be that many of those desktops might get switched off in the 
> evening and switched back on in the morning. At least, this doesn't seem too 
> unrealistic a guess to me.

Switching off/on a desktop is so bad for the hardware. It's better to
just leave them on. Especially any Unix flavor -- for exactly the
reasons we're discussing here. Crontabs need to be run. Having them all
"catchup" later (via anacron) is a kludge.

> Moreover I think we can assume that the people operating the archive servers 
> know when the load is high and whether the load spikes form a pattern.

Fair enough.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090223/d3049120/attachment.html>


More information about the ubuntu-users mailing list