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

Re: cron.daily logrotate beating up my server



On Mon, Feb 24, 2014 at 01:57:02PM +0100, Tazman Deville wrote:
> I have a little server running here in my office,
> and logrotate kept running at c. 7am, and using up 100% CPU.

Logrotate *itself* shouldn't use much CPU. But there are a couple of
things I can think that might make it do so:
 * A badly-behaved {pre,post}rotate script. These would, I suspect, show
   up as separate processes, though.
 * Compression of a large and/or corrupt log file.

In both cases, check through your logrotate config files and try running
logrotate yourself (probably with --debug).

> I changed the line in /etc/crontab to run cron.daily scripts
> at 4:15am, instead of 7:whateveritwas am.
> 15 4 * * *
> Also, in cron.daily/logrotate
> I added 
> nice -n 15
> I made these changes two days ago,
> and still, yesterday and today, logrotate is running at 7:30ami-ish,
> and using up almost 100% of CPU cycles.

A couple more points. Is logrotate running at 7:30 simply because it's
STILL running then?

Also note that nicing a process won't, by itself, make the process use
less that 100% CPU. It'll just make other processes more favoured. If
the rest of the system is idle, then a nice process can easily use 100%.

> The "server" is an old refurbed eMachines box,
> 3.2ghz single core celeron with 2gb ram (was my work box from 2007 to
> 2011), and logrotate is beating it up.
> 
> How do I get logrotate, first,
> to run at a time when the server is not busy with other stuff 
> (I'm actively doing stuff on the server at 7am, but not at 4am, which is
> why I had made that change).
> and/or
> limit its abuse of CPU cycles?
> 
> Why is it seemingly not honouring the changes I made to /etc/crontab
> and cron.daily/logrotate?
> 
> Taz
> --
> http://tazmandevil.info
> taz hungry
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: 20140224125702.GA16217@myownsite.me">http://lists.debian.org/20140224125702.GA16217@myownsite.me
> 

Attachment: signature.asc
Description: Digital signature


Reply to: