openSUSE Forums > Applications » Too much HDD activity

Go Back   openSUSE Forums > Applications
Forums FAQ Members List Search Today's Posts Mark Forums Read

Applications Questions about desktops (KDE, Gnome, XFCE, etc.), software applications (configuration, usage, bugs, documentation)

Reply
Page 1 of 2 1 2 >
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-Sep-2008, 18:22
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Too much HDD activity

I have noticed that my OpenSuSE 11 x86_64 based laptop with KDE 3.5.9 sports too much HDD activity when it is idle (not even screensaver running). The majority of activities are short "bursts" with same sound pattern, occurring mostly with up to 15 seconds between the two, sometimes up to 45 seconds between two "bursts".

I tried to track disc activity with echo 1 > /proc/sys/vm/block_dump previously shutting down the syslog to avoid block_dump logging itself.

I found that for majority of frequent bursts the reason is convergence of various regular tasks that happen at once or close together, like postfix mail checking (pickup), wifi logging WPA key update, critical firewall logs, nscd re-caching user tables, etc... Augmented with loads of kjournald writes after any such activity.

Configuring all those to happen less often, and mounting the partitions with noatime (/tmp, root) or relatime (/home and /var) flags, I found that disc activity diminished only a bit, but still persisted with up to few "bursts" per minute. The same block_dump above showed that the reason is in frequent pdflush writes to disk followed by a lot of kjournald writes.

I can understand kjournald writes happening after every change on disk, but I don't understand the frequent pdflush activity when the computer is idle! I tried to hunt down which inodes belong to blocks being written (to find which files are updated), but I could not find any. I tried that using debugfs icheck, but it failed to find any inodes in the blocks. Maybe I misunderstood the numbers reported by block_dump as block number?

I booted Suse into runlevel 3 and the pdflush writes are not present there, leading me to believe either KDE or Xorg is doing something that warrants frequent pd flushes.


Does anyone have any experience with this? How do I tune this and more importantly, how can I track what exactly is being written to disc with those writes? Thanks.
Reply With Quote
  #2 (permalink)  
Old 14-Sep-2008, 18:34
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Re: Too much HDD activity

An example of a burst logged by block_dump, shown by dmesg:

Code:
pdflush(19): WRITE block 16 on sda6
pdflush(19): WRITE block 12320776 on sda6
pdflush(19): WRITE block 12321400 on sda6
pdflush(19): WRITE block 12322032 on sda6
pdflush(19): WRITE block 12322440 on sda6
pdflush(19): WRITE block 16528632 on sda6
pdflush(19): WRITE block 16777216 on sda6
pdflush(19): WRITE block 37224448 on sda6
pdflush(19): WRITE block 37224472 on sda6
pdflush(19): WRITE block 37224680 on sda6
pdflush(19): WRITE block 37296560 on sda6
pdflush(19): WRITE block 37374304 on sda6
kjournald(1552): WRITE block 30336 on sda6
pdflush(19): WRITE block 2592 on sda3
pdflush(19): WRITE block 6592 on sda3
pdflush(19): WRITE block 7340032 on sda3
pdflush(19): WRITE block 7340040 on sda3
pdflush(19): WRITE block 7340048 on sda3
pdflush(19): WRITE block 7487488 on sda3
pdflush(19): WRITE block 9437184 on sda3
pdflush(19): WRITE block 9437192 on sda3
pdflush(19): WRITE block 9437200 on sda3
kjournald(1552): WRITE block 30344 on sda6
sda6 is /home and sda3 is /tmp. The majority of flushes happen for sda6.
Reply With Quote
  #3 (permalink)  
Old 16-Sep-2008, 18:49
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Re: Too much HDD activity

Bump! Any experts around familiar with this?
Reply With Quote
  #4 (permalink)  
Old 17-Sep-2008, 02:28
Monex's Avatar
Explorer Penguin
 
Join Date: Jun 2008
Location: Germany
Posts: 226
Monex hasn't been rated much yet
Default Re: Too much HDD activity

Hi,

is beagle enabled? beagle causes a lot of disk activity in your home directory you might want do disable it to save battery life time.

I read a good howto on improving battery life in opensuse openSUSE Tutorials maybe you find there some hints and tips how to decrease disk activity (especially powertop might be interesting).

hope this helps
Reply With Quote
  #5 (permalink)  
Old 17-Sep-2008, 10:20
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Re: Too much HDD activity

No it's not Beagle, and it is disabled. You can see in the list above there are no other processes accessing the disc during those bursts, just the pdflush daemon and naturally kjournal.

Thanks for the link, I'll check it out in the meantime.
Reply With Quote
  #6 (permalink)  
Old 18-Sep-2008, 05:42
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Re: Too much HDD activity

Ok, this is becoming insane and extremely annoying! I checked my (32-bit) server as well (no gui, no xorg), stopped all server services (named, lighttpd, ...) and ran tests. It is no different from my 64-bit laptop.

1. powertop shows same stats for my laptop and the server
2. pdflush and kjournald are the most active processes
3. disc activity is significant even with completely idle computers

Also, what is this "extra timer interrupt" that powertop shows? I tried googling but can't seem to find any answers...

Someone please help. I compare with some other distros (desktop and server) which are completely silent when idle, so this must be some OpenSuSE config...
Reply With Quote
  #7 (permalink)  
Old 19-Sep-2008, 23:40
Busy Penguin
 
Join Date: Aug 2008
Posts: 430
brunomcl hasn't been rated much yet
Default Re: Too much HDD activity

Just gessing, do you have Load_Cycle issues? See here:
Hard Hard Drive Killer Bug - Is Suse Subject To That Horrible Bug Too - openSUSE Forums
Reply With Quote
  #8 (permalink)  
Old 20-Sep-2008, 11:06
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Default Re: Too much HDD activity

I don't think it's that. I don't have unknown disc activity, I know it is pdflush daemon, but I don't understand why does it write so much (and what) on idle computer with more than 50% of free RAM and low swappiness (40).
Reply With Quote
  #9 (permalink)  
Old 21-Sep-2008, 14:10
Puzzled Penguin
 
Join Date: Sep 2008
Posts: 28
Zonei hasn't been rated much yet
Wink (Solved) Too much HDD activity

Well after an entire week of searching, poking, harrassing folks at irc, and venturing through deepest vaults of google, beyond page 17, I am pretty confident that I've nailed the problem.

Plain and simple --> ext3 journaling.

For each and every little speck written on the disc, kjournald would make substantial writes. And that got flushed by pdflush after a short while, configurable by dirty_ files in /proc/sys/vm.

So when I converted my /tmp and /var partitions to ext2, the disc misteriously fell silent. I was pleased.

Makes sense. Suse, by default, does a lot of logging and disc activity:

1. Firewall often reports critical accepted and blocked packets. Unless you run a server and you're already behind a nat router, you don't really need critical logging.
2. Wifi often has something to log, especially when WPA keys are updated (my router had default update time of 60 seconds). Check that and crank it up to an hour or more.
3. Nscd will cache passwords every minute. Disable password caching (unless you run a server with hundreds or thousands of users ssh-ing to it all the time) in nscd.conf.
4. Postfix pickup daemon will check for email every 30 seconds. Unless you run an MTA for your clients, crank that up to 5 minutes in /etc/master.cf

Add browsing to that (and perhaps favourite chat client logging), and you have pretty much constantly lit up hdd light on the laptop. The only thing preventing constant writes is pdflush which does it periodically when pages expire or grow beyond certain size.

It it also helps to partition your disc according to some usage logic. I separate /tmp, /var, /home (and on servers /srv) from root. Then / is pretty much read-only except when you install software (/usr) or edit /etc. /var is constantly being written to by logs. Your /home is a read-write-o-rama. So is /tmp. Such partitioning also helps containing fragmentation, confining it to specific partitions (yes, there _is_ fragmentation on ext2/3).

Finally, I don't need access times. Other than /var (because of mail -- and even if you don't run an MTA you need it because system may email you something nice ), all my paritions are set with noatime in fstab, and /var is set with relatime (enhanced noatime which clusters access time updates).

And if you run Virtualbox, it helps a lot to assign special noatime ext2 partition just for it (unless you really need access time -- consider relatime, and journaling on the hdd images).

Of course there are more tweaks to be done, like moving FF cache to /var, various program logs that are by default kept in ~/ should also go to /var etc...

But for now, I'll sit back and enjoy the silence of my hdd.
Reply With Quote
  #10 (permalink)  
Old 22-Sep-2008, 01:27
Parent Penguin
 
Join Date: Jun 2008
Posts: 976
DenverD hasn't been rated much yet
Default Re: Too much HDD activity

> But for now, I'll sit back and enjoy the silence of my hdd.

WOW...i'm sticking that post into my personal How-To (as "Quieten too
busy drives.")

maybe you would consider entering it into the SUSE gallery of How Tos
via http://forums.opensuse.org/how-faq-r...iewed-how-faq/
(or nntp to opensuse.org.help.howto.submissions)

and, personally i think with the ongoing 'greening' of SUSE (and move
to conserve/extend laptop battery life) you ought to grab the
attention of some of the SUSE hackers and see if there might not
should be a "laptop install" option which would auto-incorporate your
partitioning and ext2 vs 3 scheme, logging changes, etc etc etc...

ymmv.

--
see caveat: http://tinyurl.com/6aagco
DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon
Reply With Quote
Reply
Page 1 of 2 1 2 >


Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2