Link to home
Start Free TrialLog in
Avatar of ahoffmann
ahoffmannFlag for Germany

asked on

bdflush (monitoring activity)

to keep my Laptop silent I'm using following

echo "90 2000 0 0 360000 360000 90 0 0" > /proc/sys/vm/bdflush
/sbin/hdparm -S 12 /dev/hda
/sbin/hdparm -y /dev/hda

(don't worry about the values for bdflush, they are not perfect, I know:)
this works perfect for my 2.4 kernel (all versions up to 2.4.25 now) silence most the time !

But sometimes the system (kernel, whatever) continues to makes disk-access all the time for unknown reason.
Most likely this happens after wake-up from suspend to RAM (I never switch off Linux:).
Once in the state where disk-access is frequently, I need to echo to /proc/...bdflush again.
Sometimes it behaves as expected: silence, sometimes not.

1. How can I identify what caused the disk-access? Is there some debugging functionality?

Note that I switched off most daemons (cron, at, etc.), or have tuned them (syslogd).
There're no processes which require disk (swap).
Also running sync does not help. /sbin/hdparm -y /dev/hda    again with no avail too.

The kernel docs describing /proc/sys/vm/bdflush are not very helpfull.
Avatar of dbacalja
dbacalja

Try with Linux Trace Toolkit. It can provide you with VERY low level information about the system calls.
Read an article about it here (has an example):
http://www.linuxjournal.com/article.php?sid=3829

You can get the toolkit from here:
http://www.opersys.com/LTT/
Avatar of ahoffmann

ASKER

Thanks, I'll check but it needs a reboot, so takes a while ....
I'm sure you'll get a lot from ltt Achim... But you can egt a surprising amount of info from such a simple tool as a modern top. Just choose/sort by fields that should indicate any "suspicious" activity:-).

-- Glenn
top?
which field does tell anything about disk access? Think vmstat is more useful here ('til Linux releases prstat:)
None!
But you could "build a case" against some likely suspect.
Unfortunately vmstat/iostat/sar give rather little correlation to each process... Which ultimately must be your goal to identify(?)... So top/ps/trawling proc it is then. And these give next to no correlation to actual IO.
And modern day top gives a bit more info than it used to, wouldn't you say? So ... just a friendly reminder that the "lowbudget tools of everyday" actually can be of use.
"Lack of correlation" is of course rather expected with buffered IO and all:-).

-- Glenn
for kernel 2.6
you can try this
# sysctl -w vm.swappiness=20
# echo 20 >/proc/sys/vm/swappiness

# Control how much the kernel should favor swapping out applications (0-100)
vm.swappiness = 20
20 is good for laptops
I don't have 2.6 for now, and my feeling is that it is not a swap-problem, 'cause "something" starts to use the disk continously, sometimes ... (see my question: Most likely this happens after wake-up ...)
Hm, you're sure you "kill off" all the "magic dev/supermount" type things?

-- Glenn
what do you mean Glenn?
You know, the "autoplay" type of stuff litterling most any distro and desktop...:-). Mdk have the abominable supermount kernel module for it, Gnome has the "magicdev daemon" etc...
Something like that might just go slightly bonkers from time to time, especially after a suspend/wakeup.

Just a thought.

-- Glenn
my laptop is a working mashine not a multi-media center, LAN, keyborad and ASCII-screen nothing else ;-)
does this answer your suggestion, Glenn?
Almost forgot who I was talking to.... Should've known better than to ask such silly things:-).

-- Glenn
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ-Refund

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Knollbert
EE Cleanup Volunteer
didn't find a valuable solution yet, and no time to dig deep into kernel debugging ...

Anybody agrees that we PAQ this question with 0 points:
I'll post a dummy question for dbacalja 'cause http:#11240967 seems the way to go
No objections.

-- Glenn
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DonConsolio
did you mount all your filesystems with the "noatime" option ?