[GLLUG] Hard drive might be spinning too much...

Charles Ulrich charles at idealso.com
Tue May 16 09:44:49 EDT 2006


Caleb Cushing wrote:
> I think the hard drive in my desktop is spinning too much or... 
> Something is causing the light to be on on the outside too much. Is 
> there anyway to see if the hard drive is actually doing something in 
> linux. It is a SATA hard drive. I was thinking that I might be able to 
> use sdparm somehow... but I'm not sure.

A hard drive will always be spinning when there's power applied to it. 
The drive's activity LED on the outside of the case is generally only 
lit up when there's actual disk activity going on (reading/writing).

The reasons for disk activity on an otherwise apparently idle system can 
be many. Like any modern OS, Linux does a lot of system management stuff 
in the background. Occasional background disk activity is normal.

If you're low on memory, or the memory is bad or misconfigured somehow, 
Linux will try to swap out everything it can from physical memory to 
disk. (In ye olden days, the kernel would only start to swap when 
physical memory was close to full, but now this isn't the case. The swap 
algorithm is now much more proactive in conserving physical memory.)

I seem to recall that you're using a system monitoring tool called 
conky. This should be able to display the current disk activity, 
possibly in the form of a graph and will give you a lot better idea of 
what's going on than looking at the LED on the outside of the case. If 
you're seeing constant activity (meaning, something's trying to 
read/write to the disk all the time or for long stretches) then you can 
often use the program 'top' to see what might be going on. I don't 
believe there's a program that can map disk read/write activity to a 
particular program, but it can't hurt to look.

If the activity is sporadic and seems to only happen heavily at certain 
times of day, check /etc/crontab and the contents of /etc/cron.*. 
Slocate and/or other programs may be building daily indexes of files and 
in the process reading large amounts of data off the disk.

If you have a disk in your system that's truly idle 99% of the time and 
you want to save power or wear and tear, hdparm has options to spin down 
the disk. The disk will automatically spin back up the next time 
something tries to read or write to it, so using this on a system disk 
is typically futile.
-- 
Charles Ulrich
Ideal Solution, LLC -- http://www.idealso.com


More information about the linux-user mailing list