• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Ubuntu - constant disk access

Nithin

Senior member
I hear the disk access every second or so even when idle.
I installed saidar and it does show access to hdb, the root partition.

Is there anything I can use to identify the process accessing the disk. System monitor didn't have this info.

Thanks,
N.
 
You can use lsof to list open files. It'll display the file and the process id that is using it. You will probably have to narrow the list down by turning off services and such becuse there are probably alot of open files on your system.

-Teva
 
Run top and change the refresh time to 1s and sort by CPU usage. Also if you suspect it's swap activity instead of regular file activity run 'vmstat 1' and see if the blocks are attributed to swap or io.
 
i did run top. i see xorg on top. is there a need for xorg to access the disk constantly? i hope not.
i don't know why it would be swapping. I just started ubuntu. no programs loaded at all. i have 640MB memory.

I'll try lsof and vmstat 1.
 
Try running out of X Windows -- if you can boot into runlevel 3, do you still have the near-constant disk access? If not, then either the memory load of being in X, or some program or service in runlevel 5, is likely the culprit.
 
Probably some daemon periodicly checking files or whatnot.

Most programs check on files using polling. That is they simply access the file system and check to see if certain types of files are present. It's a bit of a problem sometimes as programs when they start up can sometimes try to see up to a several hundred times to see if certain files are present (this is due to sloppy programming). Obviously this can slow down otherwise fast starting programs as they are waitting on disk I/O instead of actually running.

Same things can happen with some programs. For instance say a applet on your desktop is programmed (sloppiness again) to check it's configuration files every couple seconds. On a desktop machine this is barely noticable.. but if your trying to get your drive to sleep it can be a pain in the rear.

See this article:
http://www.linuxjournal.com/article/7539

It's a couple years old now, but it seems that it will probably be accurate. In it it talks about a 'laptop_mode' script that is aviable in a certain place. Were they are talking about is in the actual Linux kernel source tree (or tarball).

Now I don't remember about Ubuntu but they probably have a 'laptop mode' version or whatnot you can install.
This page is documentation for getting Breezy working the best on a IBM Thinkpad laptop. They recommend not installing the Ubuntu package, but the latest package from Debian's related project page.
http://www.columbia.edu/~em36/ubuntubreezythinkpadt42.html

I don't know how this will apply to Dapper though. Probably the supplied package for that is much more up to date. Check out the Ubuntu forums for details or maybe somebody here running Dapper on a laptop will know the answer.

But the just of all this is that is that with your kernel in 'laptop mode' then if you disable syslogd (so you don't end up with the logging daemon logging itself accessing the disk as it logs disk access and gets in a loop) you can enable "block dump mode" and get a accurate report on exactly what proccesses are accessing what files and track down exactly what is accessing your disk.

It's a bit extreme, I suppose. And awkward and such. There may be a easier way to do it but this is the definative way to know what is going on.

Also if you think it's swap and you have plenty of RAM for your activities then you can disable swap partition access and prevent that from causing excess disk access using the swapoff command. Keep in mind that if you run out of RAM the kernel will start semi-randomly killing off programs as a end game panic mode to avoid having the machine crash due to running out of RAM.

However if your not worried about battery life or whatnot then it's probably best to leave it alone. Laptop mode should stop a lot of disk access and if it's a normal desktop then it shouldn't matter much. On my system the disk is accessed pretty regularly. Having it spin down and spin up may preserve battery life, but it also causes some excess wear. Maybe shortening the expected life of the disk from 5 years to 3 or something like that in comparision having it accessing periodicly as some random file is being accessed when the system is idle is nothing.

Hope that all that makes sense. I don't realy know much about it so it's difficult to explain it in a way that makes sense.
 
i see that reiserfs process is constantly writing to disk. is this normal for reiser file system?

You mean a reiserfsd kernel daemon? It's possible it's flushing the journal periodically, I would think that something else would have to be doing something to create journal entries though for reiserfs to need to flush them. Personally I would avoid reiserfs for other reasons but that would require a backup/restore or reinstall for you.
 
Back
Top