You are not logged in.

#1 2004-07-15 09:13:10

nkw
Member
Registered: 2004-03-26
Posts: 80

what program access hard disk every 30 second?

I have a very loud hard disk. The hard disk make a very short noice every 30 seconds, even for a new boot. Anyway to check which programming access the hard disk repeatly so I can figure out if it's possible to make the machine quiet?

Offline

#2 2004-07-15 09:30:17

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,770

Re: what program access hard disk every 30 second?

try running top in a terminal.....

HTH

Mr Green


Mr Green

Offline

#3 2004-07-15 10:28:36

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: what program access hard disk every 30 second?

fam ?
and if yes, remove it from your daemons array in /etc/rc.conf

Offline

#4 2004-07-15 11:04:26

nkw
Member
Registered: 2004-03-26
Posts: 80

Re: what program access hard disk every 30 second?

zeppelin wrote:

fam ?
and if yes, remove it from your daemons array in /etc/rc.conf

Looks I don't have fam running:
DAEMONS=(syslogd klogd !pcmcia network netfs crond sshd ntpd firewall dnsmasq ht
tpd !mysqld cups)
Is netfs necessary?

Offline

#5 2004-07-15 11:15:41

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: what program access hard disk every 30 second?

Install and run lsof - it will list all open files in the system (do this several times of course). Check ps fax for running processes - maybe you have something unncessary too. Netfs is needed only if you are using it :-) (probably not - just change it to !netfs and reboot to check)

Offline

#6 2004-07-15 15:38:16

topito
Member
From: Catalonia
Registered: 2004-03-25
Posts: 118
Website

Re: what program access hard disk every 30 second?

I had the same problem when I used reiserFS and partitions where almost full, moving to XFS solved that issue but I think thats the normal way that a journaling file system works.

Offline

#7 2004-07-15 16:57:47

marin_linuxer
Member
From: San Rafael, CA U.S.A.
Registered: 2003-09-03
Posts: 111
Website

Re: what program access hard disk every 30 second?

somthing I read about disk flush/sync timings.  There is some sort of 'laptop' mode in some kernels that if set will cause the disk to sync after a period of time in order to let APM/ACPI put the drive to sleep.

There may be settings for your filesystem to do the same(!?).  I remember old Windoze NT4 had similar problem and was not remedied until Win2k for use on laptops .... yuck, ... I said the W word.

Here's something I just dug-up:


Laptop mode ===========

This small doc describes the 2.4 laptop mode patch.

Last updated 2003-05-25, Jens Axboe <axboe@suse.de>

Introduction ------------

A few properties of the Linux vm makes it virtually impossible to attempt to spin down the hard drive in a laptop for a longer period of time (more than a handful of seconds). This means you are lucky if you can even reach the break even point with regards to power consumption, let alone expect any decrease.

One problem is the age time of dirty buffers. Linux uses 30 seconds per default, so if you dirty any data then flusing of that data will commence at most 30 seconds from then. Another is the journal commit interval of journalled file systems such as ext3, which is 5 seconds on a stock kernel. Both of these are tweakable either from proc/sysctl or as mount options though, and thus partly solvable from user space.

The kernel update daemon (kupdated) also runs at specific intervals, flushing old dirty data out. Default is every 5 seconds, this too can be tweaked from sysctl.

So what does the laptop mode patch do? It attempts to fully utilize the hard drive once it has been spun up, flushing the old dirty data out to disk. Instead of flushing just the expired data, it will clean everything. When a read causes the disk to spin up, we kick off this flushing after a few seconds. This means that once the disk spins down again, everything is up to date. That allows longer dirty data and journal expire times.

It follows that you have to set long expire times to get long spin downs. This means you could potentially loose 10 minutes worth of data, if you set a 10 minute expire count instead of just 30 seconds worth. The biggest risk here is undoubtedly running out of battery.

Settings --------

The main knob is /proc/sys/vm/laptop mode. Setting that to 1 switches the vm (and block layer) to laptop mode. Leaving it to 0 makes the kernel work like before. When in laptop mode, you also want to extend the intervals desribed above. See the laptop-mode.sh script for how to do that.

It can happen that the disk still keeps spinning up and you don't quite know why or what causes it. The laptop mode patch has a little helper for that as well, /proc/sys/vm/block-dump. When set to 1, it will dump info to the kernel message buffer about what process caused the io. Be very careful when playing with this setting, it is advisable to shut down syslog first!

Result ------

Using the laptop-mode.sh script with its default settings, I get the full 10 minutes worth of drive spin down. Provided your work load is cached, the disk will only spin up every 10 minutes (well actually, 9 minutes and 55 seconds due to the 5 second delay in flushing dirty data after the last read completes). I can't tell you exactly how much extra battery life you will gain in laptop mode, it will vary greatly on the laptop and workload in question. The only way to know for sure is to try it out. Getting 10% extra battery life is not unrealistic.

Notes -----

Patch only changes journal expire time for ext3. reiserfs uses a hardwire value, should be trivial to adapt though (basically just make it call get_buffer_flushtime() and uses that). I have not looked at other journalling file systems, I'll happily accept patches to rectify that!


-- Linux!  Isn't it time?

Offline

#8 2004-07-15 17:49:13

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: what program access hard disk every 30 second?

Yeah, if you look at your boot messages, you will probably see your journaling file system telling you the commit interval, in your case 30 sec.

Offline

#9 2004-07-21 00:12:08

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: what program access hard disk every 30 second?

use noattime,notail in fstab

notail is for reiser, I forget why. maybe lilo needed it or something.

noattime should fix the HD hit.

you can do something like mount -o remount,noattime,notail,defaults whatever
on / to test it without rebooting, and then make the changes to /etc/fstab to make it permanent.

Apart from that, dfm does the same thing, it is used e.g. for icons in VectorLinux. killall -9 dfm
Unfortunately you cant kill dfm until after you log in so an entry in .xinitrc will not work. That is for just in case anybody out there is using dfm.


--(*(cs25x--));

Offline

#10 2004-07-21 06:38:55

marin_linuxer
Member
From: San Rafael, CA U.S.A.
Registered: 2003-09-03
Posts: 111
Website

Re: what program access hard disk every 30 second?

Oh yeah, 'notail' for reiserfs is great.....essentially it prevents the 'packing' of small files into the tail of the B-tree (or something like that).  In other words, it slightly reduces the efficiency of reiserfs(slightly more disk fragmentation) while incresing the i/o speed.

Here's an IBM reiserfs article.
http://www-106.ibm.com/developerworks/l … l-fs2.html

"However, tail packing also has its disadvantages. For one, it does give you
a small but significant performance hit. Fortunately, the ReiserFS guys
anticipated that some people would be willing to sacrifice around 5% of
their disk capacity for a little extra performance, so they created the
"notail" mount option. When a filesystem is mounted with this option, tail
packing will be turned off, giving you greater speed and less storage
capacity. In general, filesystem performance freaks mount their filesystems
with both "notail" and "noatime" enabled, producing a noticeable
performance improvement:"


-- Linux!  Isn't it time?

Offline

Board footer

Powered by FluxBB