cron.daily high IO/SWAP usage

Hi,

I have a Linode 512 that uses about 200M idle. Cron.daily runs at about 6.30AM and it's giving me some issues. With about 300M left I don't see how the daily cronjobs can give so much trouble. I also don't know which particular cronjob is causing this. Here's a screenshot:

http://i.imgur.com/johOL.png

As you can see, it starts swapping and has a little IO-peak. Does that mean that something is eating up all my RAM during the cronjob?

While this one was no huge issue, sometimes it uses more. This causes mainly apache to go OOM, and restart. I'd rather not have this all the time.

Does anyone know what causes this and how I can fix it? I'm running Debian 6, here's the cronjobs:

-rwxr-xr-x  1 root root   633 Apr  1 08:40 apache2
-rwxr-xr-x  1 root root 14799 Apr 15  2011 apt
-rwxr-xr-x  1 root root    77 Jun 19  2009 apt-show-versions
-rwxr-xr-x  1 root root   314 Aug 12  2011 aptitude
-rwxr-xr-x  1 root root   502 Jun 17  2010 bsdmainutils
-rwxr-xr-x  1 root root   256 Apr 26  2011 dpkg
-rwxr-xr-x  1 root root    89 Apr 17  2010 logrotate
-rwxr-xr-x  1 root root  1335 Jan  3  2011 man-db
-rw-r--r--  1 root root   606 Nov  4  2009 mlocate
-rwxr-xr-x  1 root root  7628 Nov 27  2010 mod-pagespeed
-rwxr-xr-x  1 root root  1154 Oct 17  2010 ntp
-rwxr-xr-x  1 root root   249 Feb 15  2011 passwd
-rwxr-xr-x  1 root root  3594 Dec 19  2010 standard

I first thought that the mlocate caused it, but I disabled that one and it's still doing it :/

Thanks,

4 Replies

They're just scripts, so you can try running each one manually (I would suggest a time other than 6:30 AM) to isolate which might be the culprit. Use something like vmstat to keep an eye on I/O and swapping while running them.

That graph you posted doesn't show swapping, it barely shows any disk activity at all. Don't worry about it. FYI it's probably logrotate.

@obs:

That graph you posted doesn't show swapping, it barely shows any disk activity at all. Don't worry about it. FYI it's probably logrotate.

The reason I worry about it is because apache restarts at the same time as that cronjob runs, which makes me thinks it goes oom & restarts to free up memory.

logrotate will gracefully restart apache to flush the logs, checking for an oom is easy connect to lish and you'll see a load of console messages saying out of memory and what was killed.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct