Page 1 of 5
Finding out what's using disk
Posted: 30 Nov 2011, 02:07
by DanielM
Hi all.
Last few days it sounds like the disk in my B3 is used much more than usual. Not that it's a big problem, but it kinda worries me. So I'm trying to find out what's using it. Googled for solutions and found some nice tools. None of them seem to work though, seems like there's kernel stuff missing.
Atop says:
Code: Select all
No disk-activity figures available; request ignored!
Iotop says:
Code: Select all
Could not run iotop as some of the requirements are not met:
- Linux >= 2.6.20 with
- I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING)
So, question is, is there any other good way of finding out what's happening (without checking every single file with lsof)? Any chance of getting support for this in future kernel versions?
/Daniel
Re: Finding out what's using disk
Posted: 30 Nov 2011, 04:04
by johannes
Iotop support will be included in the kernel releasing with 2.4 soon.
Re: Finding out what's using disk
Posted: 30 Nov 2011, 04:34
by DanielM
johannes wrote:Iotop support will be included in the kernel releasing with 2.4 soon.
Thanks Excito!
(however I still don't know what's using my disk now. Guess there's nothing I can do about that for the moment?)
/Daniel
Re: Finding out what's using disk
Posted: 30 Nov 2011, 06:02
by Puma
Thanks Excito Team, I was looking for the same.
Puma
Re: Finding out what's using disk
Posted: 30 Nov 2011, 07:03
by su_root
DanielM wrote:johannes wrote:Iotop support will be included in the kernel releasing with 2.4 soon.
Thanks Excito!
(however I still don't know what's using my disk now. Guess there's nothing I can do about that for the moment?)
/Daniel
try from the B3 terminal:
Look for processes that is "suspicious". Also, what does top say, are you running high on CPU/RAM etc.?
EDIT: you could also try to disable swap if you're not tight on RAM
Re: Finding out what's using disk
Posted: 30 Nov 2011, 07:06
by DanielM
su_root wrote:Look for processes that is "suspicious". Also, what does top say, are you running high on CPU/RAM etc.?
Already checked all that. Nothing obviously strange. Just the sound of the hd...
/Daniel
Re: Finding out what's using disk
Posted: 30 Nov 2011, 07:12
by su_root
What are your logs saying, try to tail -f on them if they could provide more info.
Re: Finding out what's using disk
Posted: 30 Nov 2011, 07:22
by su_root
Is there collectl in the repos? If there is, try to install and run it.
edit: or try atop/htop or nmon
Re: Finding out what's using disk
Posted: 30 Nov 2011, 09:18
by DanielM
su_root wrote:Is there collectl in the repos? If there is, try to install and run it.
edit: or try atop/htop or nmon
Collectl doesn't seem to live in the repos. Atop is already tried (see first post in thread). Tried nmon, can't really find any way of seeing what's using the disk there.
/Daniel
Re: Finding out what's using disk
Posted: 30 Nov 2011, 11:47
by su_root
Ok, sorry, missed that!
Btw, how do you know that the HDD is in use (read/write)? Have you tried to stop all services (not 100% needed by the OS) and start one by one?
Re: Finding out what's using disk
Posted: 30 Nov 2011, 12:11
by DanielM
su_root wrote:Ok, sorry, missed that!
Btw, how do you know that the HDD is in use (read/write)? Have you tried to stop all services (not 100% needed by the OS) and start one by one?
I know that because I can hear it seeking. It normally only sounds like this when I'm watching movies or downloading stuff, now it's all the time. I've also been thinking about stopping services, guess that'll be what I'll end up doing...
/Daniel
Re: Finding out what's using disk
Posted: 30 Nov 2011, 12:37
by su_root
I know that because I can hear it seeking. It normally only sounds like this when I'm watching movies or downloading stuff, now it's all the time.
How frequently can you hear it seeking, all the time or every X minutes? I've noticed that sometimes before a HDD crashes, it can make sounds like it is seeking.
Backup your important data and try to do a performance test on the disk to see if it is working slower than it should.
Do you have smartmontools installed? If so, try disable it.
Re: Finding out what's using disk
Posted: 30 Nov 2011, 15:34
by johannes
I am no expert here but we did a quite deep investigation when discussing a potential spin-down feature. Back then, we found that Linux needs to touch the disk very often, something like every 10 seconds, for various tasks. I don't remember in detail (the guy who knows has sadly left Excito), but there are so many various systems so it was quite difficult to change that behaviour. inotify, logging, swap, flushing etc etc. Googling for "linux hard disk spin down" gives some interesting reading about the issues involved, perhaps this clarifies?
Re: Finding out what's using disk
Posted: 30 Nov 2011, 16:41
by su_root
Yes, it is quite a pain. But hard problems take time to get solved and impossible takes a little longer.
It would be nice to see with what kernel parameters B3 is booted and also what filesystem/s are being used. ext4 accesses HDD more often than ext2, syslogs should not be a problem but the /tmp could possible be harder to get around. There are lot's of things that can be done but due to 512mb ram there are limits what is wise to do (disable swap is tempting or use minimal swap to USB memory stick perhaps better).
I have to start testing more tomorrow but on my work laptop (running Fedora), I have disabled swap, enabled laptop mode and I have the feeling that it doesn't touch the HDD that often when laptop is in idle.
I don't know yet howto check how often a disk has spun up the last 24h, I'll get back to this later.
edit: I guess I can check with this
sudo smartctl -a /dev/sda | grep Load_Cycle_Count
Re: Finding out what's using disk
Posted: 30 Nov 2011, 16:56
by johannes
su_root wrote:But hard problems take time to get solved and impossible takes a little longer.
That's the spirit!