Constant Disk I/O – What’s Taking All Disk Resources?

Recently, I updated my system and some other applications on my laptop and I found that some program on my system began gobbling up huge amounts of disk-activity. I looked at Gnome’s system-monitor and found that extremely unhelpful. Yeah, I could discovered what was taking the CPU and Nice readings but neither of these told me what was causing all the spin up activity of the hard-disk. This may not be a big deal for modern disks but for old computers it brought it to a halt and kept it that way minute(s) at a time. An easy way to monitor programs use of disk-activity is to use block dump.

First set block dump active in /proc:

sudo sh -c "echo 1 > /proc/sys/vm/block_dump"

Looking at the syslog now will tell where resources are going:

tail -f /var/log/syslog

Looking at this I discovered that Firefox-3.01 was taking all the disk resources:

Sep  3 12:18:23 partridge-ibook kernel: kjournald(2443): WRITE block 7152 on hda11
Sep  3 12:18:23 partridge-ibook kernel: kjournald(2443): WRITE block 7160 on hda11
Sep  3 12:18:25 partridge-ibook kernel: firefox(3655): READ block 2234472 on hda9
Sep  3 12:18:29 partridge-ibook kernel: firefox(3655): READ block 649144 on hda9

For some unknown reason Firefox-3.01 was reading and writing to the disk far more than Firefox-3.0-beta5 was. What an incredible disappointment. Firefox-3.01 literally made my laptop come to a complete halt. This is incredibly disappointing because the beta version performed alot better with very little I/O activity.

I looked this up a bit but never really found the answer. Firefox uses fsync to save data (history, bookmarks) during a session, sometimes excessively. Because of inherent problems with fsyncing and the ext3 filesystem not much can be done with it. Fsyncing can be disabled by entering a Preference Name “toolkit.storage.synchronous” in “about:config” and inputting a value of 0, but this didn’t fix the problem. It turns out that Firefox-3.01 just uses alot more memory and re-allocates memory a good deal more often, so swap is being used and paged about every 2 minutes and can take minutes to finish. Unfortunately, a Firefox-3.0-beta5 ebuild is no longer in portage.

Turning block dumping off is the opposite of turning it on:

sudo sh -c "echo 0 > /proc/sys/vm/block_dump"

Looks like back to Epiphany for me, or heck, who knows, maybe Google Chrome will be stable soon!

Thanks to vor for the tip.

Enjoy the Day!

About these ads

About Todd Partridge (Gently)

Good times, good people, good fun.

3 comments on “Constant Disk I/O – What’s Taking All Disk Resources?

  1. Check out sys-process/iotop. Another wonderful tool to show which process is doing I/O.

  2. Yeah and sys-process/latencytop is also nice

  3. Aha, so that’s why on my Windows laptop, sooner than later I’d get a distictive amount of HD usage when running Firefox. And I thought it was some virus or somesuch.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 51 other followers

%d bloggers like this: