Hard drive accessed every couple of seconds?

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Hard drive accessed every couple of seconds?

Postby exploder on Sat May 03, 2008 10:45 pm

I just purchased this computer.

http://www.bestbuy.com/site/olspage.jsp ... 3815923428

I installed Daryna and all of the hardware was detected and is working fine. I have noticed that the Hard Drive light flashes every two seconds when the computer is idle.

Is this normal? I need to make this machine last. Help me out here.
exploder
Level 15
Level 15
 
Posts: 5894
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Linux Mint is funded by ads and donations.
 

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 12:37 am

exploder,

I don't know what your light is triggered by. Hopefully the drive is spinning all the time and is not trying to spin down in that short a period of time.

The ext3 file system re-syncs the journal every 2 - 5 seconds, depending on the distro. I don't know what it is on Mint 4. I don't remember what the command is right off hand to change that but you can Google ext3 and find it pretty easy. I wouldn't set this time over 1 min. if it were me. I usually set mine at 30 seconds for a desk top.

Fred

EDIT: I looks like I misspoke above. Changing that time is a compile time option in the kernel. I was mis remembering from Gentoo. You can turn the sync flush to disk off. but then you have to sync it manually, say from a corntab, or you lose the advantage of having a journal. The time between re-syncs is the time you will loose your working data.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby ed@Mint on Sun May 04, 2008 5:59 am

Hi exploder,

I kinda have the same problem on my laptop.
My temporary solution is this :
Code: Select all
sudo hdparm -B 254 /dev/sda

However, i'm not sure whether this should be fixed through /etc/hdparm or via the 'laptop-mode' module config (in your case, this is irrelevant since it is a desktop).
I'm slowly making researches on that subject to understand the problem better.
Here is a thread in which i give what i came into so far : http://linuxmint.com/forum/viewtopic.php?f=49&t=10343&hilit=+vostro
And two interesting links :
http://gentoo-wiki.com/HOWTO_Use_hdparm ... erformance
http://www.gentoo.org/doc/en/power-mana ... #doc_chap5

Let me know if you can find further info... :wink:
ed
In libro veritas

Now switched to : ArchLinux

New users, read the Linux Mint User Guide | Problem ? See the Wiki first | Check out the Software Portal | Join the IRC channel : #linuxmint @ irc.spotchat.org
User avatar
ed@Mint
Level 5
Level 5
 
Posts: 565
Joined: Sun Mar 09, 2008 6:03 pm
Location: Liege, Belgium

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 6:16 am

There are actually two issues here.

One is the spin up, spin down timing etc. This is the power saving approch used in lap tops.

The other is the ext3 journal syncing issue.

Data flushing to disk shouldn't be an issue on a inactive desk top. Once done an inactive desk top could go for hours and not need to access the disk except for the auto timed journal re-sync check.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 8:49 am

exploder,

A couple more things. I do not recommend that you use any of the power saving options that allow spin down on a desk top. Desk top hard drives are not rated for lots of power cycles like laptop drives are. Compared to hours of operation, spin up cycles are quite limited as far a MTBF is concerned.

I am not sure if using journal data writeback mode on ext3 instead of the default ordered mode turns off the 5 sec. sync or not. If it does, you might be interested in using it just for hard drive life. It is also faster, but not as safe, data recovery wise. There is a link below that shows you how to set it up. It might be worth a try just to see if it stops the sync access you seem to be seeing with the light.

http://ubuntuforums.org/showthread.php?t=107856

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby exploder on Sun May 04, 2008 9:23 am

I appreciate the replies and the information but I still don't understand this?

I have never seen this happen before, the hard drive LED flashes on and off constantly every 2 seconds. The drive is quiet but then it really never makes any noise.

The other is the ext3 journal syncing issue.


This seems to make sense but will this cause the drive to eventually fail?
exploder
Level 15
Level 15
 
Posts: 5894
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: Hard drive accessed every couple of seconds?

Postby Cambo105 on Sun May 04, 2008 9:32 am

I have noticed the flashing hard drive access light on my laptop as well. However it comes at much larger spaced intervals (~10 seconds). I always wondered what it was...
Keep your stick on the ice.

If the women don't find you handsome, they should at least find you handy.
Cambo105
Level 3
Level 3
 
Posts: 109
Joined: Fri Feb 15, 2008 12:20 am

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 9:40 am

exploder,

The 5 sec. ext3 journal syncing in ordered mode is the default mode of operation on version 2 of the ext3 file system. I wouldn't think it would cause pre-mature disk failure on Mint any more than using ext3 on any other Linux distro.

It just means more disk reads than you would have with a non-journaled file system in a given period of time. With an inactive system you wouldn't be writing out to disk that often, just reading. Reading is the least damaging operation for a hard drive. I have never seen anything that would indicate that journaled file systems wear out drives faster, but I don't know that to be true or false.

I suspect the light on the box must be triggered by any drive activity. Looks sexy to the user, means next to nothing.

If it bothers you, you can try what I suggested above.

Fred
Last edited by Fred on Tue May 06, 2008 6:02 am, edited 2 times in total.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby exploder on Sun May 04, 2008 9:50 am

Thanks Fred! Sounds like there is nothing to worry about.
exploder
Level 15
Level 15
 
Posts: 5894
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 9:53 am

Cambo105,

Your light is probably flashing at the beginning of each sync cycle. exploder is probably seeing the beginning and the end of the cycle. On a laptop the power save mode may have set the sync cycle to 10 sec. too.

But I am just guessing on the above. If your disk drive is trying to spin up and down that often it will wear out pretty fast. I am assuming that isn't what is happening.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby exploder on Sun May 04, 2008 10:27 am

If I run dmesg | grep kjournald , here is the output I get.

[ 33.315086] kjournald starting. Commit interval 5 seconds

I never noticed this behaviour on the old pc.
exploder
Level 15
Level 15
 
Posts: 5894
Joined: Tue Feb 13, 2007 10:50 am
Location: HartfordCity, Indiana USA

Re: Hard drive accessed every couple of seconds?

Postby Cambo105 on Sun May 04, 2008 3:17 pm

All this talk about hard drive wear got me worried, so I did a little googling. It seems Ubuntu Gutsy has an issue with premature HDD wear. Can any one validate this and offer possible solutions? I'd hate to think Linux is destroying my computer, it would just be adding fuel to the fire for the people who dislike Linux already.
Keep your stick on the ice.

If the women don't find you handsome, they should at least find you handy.
Cambo105
Level 3
Level 3
 
Posts: 109
Joined: Fri Feb 15, 2008 12:20 am

Re: Hard drive accessed every couple of seconds?

Postby Husse on Sun May 04, 2008 4:07 pm

@ cambo105
The solution (if needed) is in this topic a bit up
viewtopic.php?f=49&t=12124#p74539
@ exploder
I also get the drive led flashing but less often and not as regular as you do
There was Vista originally on that box (?) you could check if it is different in Vista
That said I remember I've seen computers where the drive led flashes regularly like another lighthouse beacon :) - but no noise which means that the hdd does not do anything. Spinning up/down would be clearly audible and if you listen carefully you should hear the actuator "clicking"
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Hard drive accessed every couple of seconds?

Postby Cambo105 on Sun May 04, 2008 4:18 pm

Mine is definitely audible, so I assume the fix applies to me? Is this going to resolved in Elyssa, and how much damage have I done to my HDD in the past 4 months?
Keep your stick on the ice.

If the women don't find you handsome, they should at least find you handy.
Cambo105
Level 3
Level 3
 
Posts: 109
Joined: Fri Feb 15, 2008 12:20 am

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 4:22 pm

If we rule out the spin up down issue for the moment, I think the flashing light thing is related to exactly what is triggering it on the various boxes.

Journal syncing is something that must happen or the journal is worthless. Like I said, the default time is 5 sec. I know this can be set at kernel compile time and I am thinking there may be a way to modify it from the command line but I haven't been able to find it in my notes. So I may be misremembering.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby Fred on Sun May 04, 2008 4:24 pm

Cambo105,

The above post was not directed at you. Husse's post applies to you if you are having spin up down issues.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby Cambo105 on Mon May 05, 2008 7:26 pm

I've been seriously looking into this hard drive issue, and I think this post over at the Ubuntu forums explains alot:
http://ubuntuforums.org/showpost.php?p= ... stcount=26

I followed the diagnostic steps in the post, and at the current rate my hard drive shouldn't last another two years. I've had it for 8 months and already I have 160,000 of the 600,000 load cycles for my drive. Using the utilities in the post my HDD parks and unparks ~5 times a minute, which seems very excessive. I guess my biggest question is, does Windows have this same problem? If not, this issue seems like a huge blow to Linux, as I would like to get more than two years out of my drive.

I suppose I could take the "feature not a bug" route, and use hdparm to adjust my drive settings and keep it from parking the heads when I know I'm not going to be moving my laptop. However I am weary about this as I've yet to see an explanation of what the code sudo hdparm -B 254 /dev/sda actually means, and how 254 is different from 255 et cetera.

So what is the general take on this? A bug? A huge blow to Linux and another +1 for windows (which are few and far between)?
Keep your stick on the ice.

If the women don't find you handsome, they should at least find you handy.
Cambo105
Level 3
Level 3
 
Posts: 109
Joined: Fri Feb 15, 2008 12:20 am

Re: Hard drive accessed every couple of seconds?

Postby ed@Mint on Mon May 05, 2008 7:53 pm

As i've stated before, i don't have a lot of info about this either.
The 'sudo hdparm -B 254' command actually modifies the power management 'policy' for hard disks.
Setting it to 255 disables power management while 254 is like 'full performances = minimum power management' and, thus, increases the amount of time between two head parkings. (obviously, setting it to 1 does the exact opposite)
For more info about the hdparm command, read the manual page ('man hdparm' in a terminal), or check the gentoo links i gave previously.

I agree that the hdd lifetime concern is a bit worrying, but i guess the developpers have to make a choice at one moment for that stuff to accommodate most of the users out of a standard install process. We seem to have a bit more tricky disks that require fine tune to work properly.
Linux in itself is not to blame on that, it gives us all the tools we need.
Now we only have to fully understand the thing to set the appropriate config... :wink:
In libro veritas

Now switched to : ArchLinux

New users, read the Linux Mint User Guide | Problem ? See the Wiki first | Check out the Software Portal | Join the IRC channel : #linuxmint @ irc.spotchat.org
User avatar
ed@Mint
Level 5
Level 5
 
Posts: 565
Joined: Sun Mar 09, 2008 6:03 pm
Location: Liege, Belgium

Re: Hard drive accessed every couple of seconds?

Postby Fred on Mon May 05, 2008 8:36 pm

Cambo105,

This is a contentious and complex issue. I have posted at least a couple of times on this. If you are interested in my opinion you can search the forum. They are there somewhere.

The short answer is that there is no short, correct answer. This is a problem with the physics of hard drives. It really became a problem when we decided to stuff hard drives into a carry around computer. Hard drives are delicate mechanical devices that are subject to damage at relatively low G forces. Various schemes are used to try to limit their exposure to vibration and still allow them to work. One of those is to park and lock the read/write head as much as possible.

All applications, OSs or whatever, have the same problems trying to hit a happy medium between turned off, locked down, and zero power consumption; and running all the time, head unlocked and ready, and full power consumption. There is not a "right" setting. There is your settings, my settings, Ubuntu's settings, Windows' settings, etc. Depending on your usage patterns and the environment you have your computer in, the settings best for you might be different from the ones best for me. The distro developers set this up to try to maximize usability and durability for the largest group of users. It is nothing more than an educated guess on their part.

Windows has the same problem to deal with. Did they make better compromises? I don't know. For some probably so, for others probably not. This is not an issue with Windows because there is no choice, you take what they give you, it isn't user adjustable. Do hard drives fail early under Windows? Most definitely. Though I would say that Windows probably has the edge because hard drive manufactures build their drives mainly for the Windows market. It stands to reason that they would on average last longer under Windows. But that is pure speculation on my part.

If you feel like you have the knowledge to set up your drive duty cycle better then the distro developer set it, then by all means adjust away. If not then I would leave it alone.

If you want to extend your laptop hard drive life, and are willing to give up the advantages of a journaled file system, then use the ext2 file system. It requires a lot less interaction with the hard drive.

I would end by saying that if you get two to three years of operational service from a laptop hard drive, you have done ok. Laptop drives just live too rough a life to last like a desktop drive would.

Fred
Last edited by Fred on Tue May 06, 2008 5:53 am, edited 1 time in total.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Hard drive accessed every couple of seconds?

Postby Cambo105 on Mon May 05, 2008 10:11 pm

Fred,
I've read through some of your posts, and just a lot of general information concerning this issue. It definitely seems solutions are unique to the user, and even then there is no perfect solution. I've settled on a setting of 254 for when I know my laptop is in no danger of being jarred (90% of the time) and the default setting for mobile use. (Is this 128, could some one clear this up?)
Keep your stick on the ice.

If the women don't find you handsome, they should at least find you handy.
Cambo105
Level 3
Level 3
 
Posts: 109
Joined: Fri Feb 15, 2008 12:20 am

Linux Mint is funded by ads and donations.
 
Next

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 11 guests