You are not logged in.

#1 2011-03-15 09:57:23

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

[KDE] Who does poll my HDD?

Under KDE every few seconds HDD LED does blink even at absence of any visible activity. Under, say, Fluxbox the LED is almost constantly turned off. How to determine that KDE component polling an HDD?


"I exist" is the best myth I know..

Offline

#2 2011-03-15 10:17:10

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 581

Re: [KDE] Who does poll my HDD?

Nepomuk is a usual suspect, especially if you've just recently installed KDE (first indexing).

If it isn't Nepomuk, may wanna try this script I found a while ago somewhere on the internet.

#!/bin/sh
case "$1" in --pids) SEL=2;; --procs) SEL=1;;
--files|*) SEL=9;;
esac; for tree in home proc dev usr var; do 
echo -n "/$tree: "; lsof -w -n -a -d0-10 -a +D \
/$tree|grep '[0-9][urw]'|awk --assign VAR="$SEL" \
'{print $VAR}'|sort|uniq|xargs; done; exit 0

Save it as, say, showproc.sh (make it exec), and sh showproc.sh will give you files that are currently opened for reading/writing,  sh showproc.sh --procs will give you applications that use those files, and sh showproc.sh --pids will give you process IDs of those apps.

Hope it helps. smile

Last edited by Xabre (2011-03-15 10:18:30)

Offline

#3 2011-03-15 11:00:53

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

Xabre, thanks! I have tried, but it didn't help. I think, the thing is, lsof shows opened files. OTOH, that poller may open and close a file(s). So, something like "tail -f" (but for files access) is needed.

I wan't absolutely correct. In terminal (without X11) the polling still takes place (every 2-3 seconds, very shortly), but with notably  less LED intensity. This is process list (in terminal). Probably somebody can point that poller.

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   3916   632 ?        Ss   11:57   0:00 init [3]  
root         2  0.0  0.0      0     0 ?        S    11:57   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    11:57   0:00 [ksoftirqd/0]
root         6  0.0  0.0      0     0 ?        S    11:57   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    11:57   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S    11:57   0:00 [migration/1]
root        10  0.0  0.0      0     0 ?        S    11:57   0:00 [ksoftirqd/1]
root        11  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/0:1]
root        12  0.0  0.0      0     0 ?        S    11:57   0:00 [watchdog/1]
root        13  0.0  0.0      0     0 ?        S    11:57   0:00 [migration/2]
root        14  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/2:0]
root        15  0.0  0.0      0     0 ?        S    11:57   0:00 [ksoftirqd/2]
root        16  0.0  0.0      0     0 ?        S    11:57   0:00 [watchdog/2]
root        17  0.0  0.0      0     0 ?        S    11:57   0:00 [migration/3]
root        19  0.0  0.0      0     0 ?        S    11:57   0:00 [ksoftirqd/3]
root        20  0.0  0.0      0     0 ?        S    11:57   0:00 [watchdog/3]
root        21  0.0  0.0      0     0 ?        S<   11:57   0:00 [cpuset]
root        22  0.0  0.0      0     0 ?        S<   11:57   0:00 [khelper]
root        23  0.0  0.0      0     0 ?        S<   11:57   0:00 [netns]
root        24  0.0  0.0      0     0 ?        S    11:57   0:00 [sync_supers]
root        25  0.0  0.0      0     0 ?        S    11:57   0:00 [bdi-default]
root        26  0.0  0.0      0     0 ?        S<   11:57   0:00 [kblockd]
root        27  0.0  0.0      0     0 ?        S<   11:57   0:00 [kacpid]
root        28  0.0  0.0      0     0 ?        S<   11:57   0:00 [kacpi_notify]
root        29  0.0  0.0      0     0 ?        S<   11:57   0:00 [kacpi_hotplug]
root        30  0.0  0.0      0     0 ?        S    11:57   0:00 [kseriod]
root        31  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/1:1]
root        32  0.0  0.0      0     0 ?        S    11:57   0:00 [khungtaskd]
root        33  0.0  0.0      0     0 ?        S    11:57   0:00 [kswapd0]
root        34  0.0  0.0      0     0 ?        SN   11:57   0:00 [ksmd]
root        35  0.0  0.0      0     0 ?        S    11:57   0:00 [fsnotify_mark]
root        36  0.0  0.0      0     0 ?        S<   11:57   0:00 [aio]
root        37  0.0  0.0      0     0 ?        S<   11:57   0:00 [crypto]
root       446  0.0  0.0      0     0 ?        S<   11:57   0:00 [ata_sff]
root       447  0.0  0.0      0     0 ?        S    11:57   0:00 [scsi_eh_0]
root       448  0.0  0.0      0     0 ?        S    11:57   0:00 [scsi_eh_1]
root       450  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/u:2]
root       451  0.0  0.0      0     0 ?        S    11:57   0:00 [scsi_eh_2]
root       452  0.0  0.0      0     0 ?        S    11:57   0:00 [scsi_eh_3]
root       453  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/u:3]
root       455  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/3:1]
root       456  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/2:1]
root       457  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/3:2]
root       458  0.0  0.0      0     0 ?        S    11:57   0:00 [kworker/0:2]
root       499  0.0  0.0      0     0 ?        S    11:57   0:00 [jbd2/sda2-8]
root       500  0.0  0.0      0     0 ?        S<   11:57   0:00 [ext4-dio-unwrit]
root       529  0.0  0.0  10912  1228 ?        S<s  11:57   0:00 /sbin/udevd --daemon
root      1381  0.0  0.0      0     0 ?        S    11:57   0:00 [khubd]
root      2394  0.0  0.0      0     0 ?        S<   11:57   0:00 [usbhid_resumer]
root      2493  0.0  0.0      0     0 ?        S    11:57   0:00 [jbd2/sda3-8]
root      2494  0.0  0.0      0     0 ?        S<   11:57   0:00 [ext4-dio-unwrit]
root      2599  0.0  0.0  28348   400 ?        S    11:57   0:00 supervising syslog-ng
root      2600  0.0  0.0  59996  2944 ?        Ss   11:57   0:00 /usr/sbin/syslog-ng
dbus      2608  0.0  0.0  13404  1508 ?        Ss   11:57   0:01 /usr/bin/dbus-daemon --system
root      2629  0.0  0.0      0     0 ?        S    11:57   0:00 [flush-8:0]
root      2644  0.0  0.0   8224   340 ?        Ss   11:57   0:00 /sbin/dhcpcd -q eth0
root      2659  0.0  0.0   6012   660 ?        Ss   11:57   0:00 /usr/sbin/crond -S -l info
root      2668  0.0  0.0   6564   396 ?        Ss   11:57   0:00 /usr/sbin/gpm -m /dev/input/mice -t imps2
root      2677  0.0  0.0  80100  3876 ?        Ss   11:57   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
root      2691  0.0  0.0  11444  1544 ?        S    11:57   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql
mysql     2950  0.0  0.9 344620 39988 ?        Sl   11:57   0:01 /usr/bin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/anli.err --pid-file=/var/lib/mysql/anli.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root      3066  0.0  0.0  47472  2380 ?        Ss   11:57   0:00 /usr/lib/postfix/master
postfix   3077  0.0  0.0  47624  2328 ?        S    11:57   0:00 qmgr -l -t fifo -u
root      3087  0.0  0.2 110644  9868 ?        S    11:57   0:01 /usr/bin/python2 -O /usr/share/wicd/daemon/wicd-daemon.py
root      3093  0.0  0.2  98576 10104 ?        S    11:57   0:00 /usr/bin/python2 -O /usr/share/wicd/daemon/monitor.py
root      3118  0.0  0.0  22276   492 ?        Ss   11:57   0:00 /usr/sbin/lircd -d /dev/lirc0
root      3119  0.0  0.0  56284  1636 tty1     Ss   11:57   0:00 /bin/login --     
root      3120  0.0  0.0   3912   600 tty2     Ss+  11:57   0:00 /sbin/agetty -8 38400 tty2 linux
root      3121  0.0  0.0   3912   604 tty3     Ss+  11:57   0:00 /sbin/agetty -8 38400 tty3 linux
root      3122  0.0  0.0   3912   600 tty4     Ss+  11:57   0:00 /sbin/agetty -8 38400 tty4 linux
root      3123  0.0  0.0   3912   600 tty5     Ss+  11:57   0:00 /sbin/agetty -8 38400 tty5 linux
root      3124  0.0  0.0   3912   600 tty6     Ss+  11:57   0:00 /sbin/agetty -8 38400 tty6 linux
root      3239  0.0  0.0 124768  3632 ?        Sl   12:07   0:00 /usr/sbin/console-kit-daemon --no-daemon
root      3306  0.0  0.1 120820  4108 ?        Sl   12:07   0:00 /usr/lib/polkit-1/polkitd
anli      3316  0.0  0.1  19376  4916 tty1     S    12:07   0:00 -bash
root      3542  0.0  0.0  10908  1196 ?        S<   12:07   0:00 /sbin/udevd --daemon
root      3543  0.0  0.0  10908  1168 ?        S<   12:07   0:00 /sbin/udevd --daemon
root      3614  0.0  0.0 121308  3380 ?        Sl   12:07   0:00 /usr/lib/upower/upowerd
root      3656  0.0  0.0 125000  3484 ?        Sl   12:07   0:00 /usr/lib/udisks/udisks-daemon
root      3657  0.0  0.0  42584   724 ?        S    12:07   0:00 udisks-daemon: polling /dev/sr0
anli      4235  0.0  0.0   5964    88 ?        Ss   12:21   0:00 irexec -d /home/anli/.lircrc.clementine.max
postfix   6877  0.0  0.0  47560  2304 ?        S    13:37   0:00 pickup -l -t fifo -u
root      7183  0.0  0.0      0     0 ?        S    13:47   0:00 [kworker/1:2]
root      7434  0.0  0.0  19552  1204 tty1     S+   13:53   0:00 sudo ps aux
root      7435  0.0  0.0  11536  1192 tty1     R+   13:53   0:00 ps aux

Last edited by student975 (2011-03-15 11:01:42)


"I exist" is the best myth I know..

Offline

#4 2011-03-15 11:03:10

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

This one?

udisks-daemon: polling /dev/sr0

How to determine?


"I exist" is the best myth I know..

Offline

#5 2011-03-15 11:12:20

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [KDE] Who does poll my HDD?

It may help to install iotop.  It's like 'top' but monitors I/O by process.

Offline

#6 2011-03-15 11:29:06

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

thisoldman, thanks! - it helped. It's definitely

[jbd2/sdaX-Y]

It seem like ext4 journaling does something smart in it's own smile


"I exist" is the best myth I know..

Offline

#7 2011-03-15 11:40:39

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [KDE] Who does poll my HDD?

I have in /etc/fstab:

UUID=blahblahblah   /   ext4    defaults,noatime,commit=60  1 1

Use noatime (or relatime, if you use a crappy prog like mutt that needs it) and a commit= that's larger than the default of 5 seconds.

Offline

#8 2011-03-15 11:50:07

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

brebs, thanks for the tip. Will larger commit value reduce fs reliability? noatime, of course, is in use already.

BTW, I'm assembling home NAS (and, in fact, selecting Linux distributive for such NAS ended with AL, and last one is exited me at such degree I have already switched from Kubuntu to AL on my workstation wink). NAS' OS will be placed onto flash USB drive, and large commit interval can be useful there also to reduce write to the memory stick.

Last edited by student975 (2011-03-15 12:00:49)


"I exist" is the best myth I know..

Offline

#9 2011-03-15 12:18:30

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [KDE] Who does poll my HDD?

Here's "commit=" info.

Offline

#10 2011-03-15 12:48:45

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

brebs wrote:

Here's "commit=" info.

Sorry, I have not found any shared experience wrt large commit interval and reliability.
BTW, AFAIR, nodiratime is not needed when noatime is in use (last one includes first ine).


"I exist" is the best myth I know..

Offline

#11 2011-03-15 12:57:29

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [KDE] Who does poll my HDD?

Yeah, I've just removed nodiratime.

You ask about reliability. Well, of course, anything that delays writes can reduce reliability. It's all a trade-off between reliability and performance, but I've not suffered any corruption. See doc.

Offline

#12 2011-03-15 13:14:22

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 601

Re: [KDE] Who does poll my HDD?

I have already read the man wink OK, it seems like I will stay with default 5 seconds interval as a good compromise between safety and performance. Thanks!


"I exist" is the best myth I know..

Offline

#13 2011-03-15 13:28:58

brebs
Member
Registered: 2007-04-03
Posts: 3,412

Re: [KDE] Who does poll my HDD?

As an anecodote:

A few years ago I was using an old but stable laptop with a noisy fan, and the hard drive was adding heat, so I configured smartmontools to deliberately cache and spin down the HD for about 2-3 *hours*, and stop the noisy fan from being so annoying.

Of course, a low battery warning would have overridden that.

Hope that puts 5 seconds into perspective wink

Offline

Board footer

Powered by FluxBB