Mayuresh wrote: > On Tue, Jun 23, 2015 at 01:27:10PM -0600, Bob Proulx wrote: > > # hdparm -B255 /dev/sda > > I had disabled this when I wrote the OP, but had not set it in > /etc/hdparm.conf. Today I did that and the Load_Cycle_Count seems steadied > at 3781, though it is still under observation.
Good deal! > When I wrote the OP I got an impression that -B255 isn't helping, because > I wasn't aware of Load_Cycle_Count and I measured the disk activity by the > following command: > > iotop -obqqqq --delay .1 > > This still continues to show kworker doing some activity: > > 103 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.87 % [kworker/1:2] >... > What to attribute this disk activity to? I have tried checking using lsof > whether any files are changing that fast (such as syslog) but that is not > the case. That looks like a fairly low level of activity. It can be hard to chase down everything that writes to the disk. This is a topic that you can read more about in the laptop lists. For example "laptop-mode" tries to hold off disk writes so as save battery by avoiding disk spinups. Researching documentation there would be useful. Here is an old Linux Journal article no it. http://www.linuxjournal.com/article/7539 There is a kernel interface to debug blocks written to disk. Here is a nice quick summary of the feature. http://www.unixdaemon.net/linux/proc-block-dump.html And more detail here: http://samwel.tk/laptop_mode/faq WARNING! You want to make sure your debug logging doesn't cause more disk activity which causes more logging which causes more disk activity and so on in a vicious feedback loop. The faq article above describes this in more detail. But here is a snippet from the proc-block-dump article to show the capabilities. Mar 14 19:16:44 localhost kernel: sshd(2659): dirtied inode 388836 (sshd) on sda1 Mar 14 19:16:44 localhost kernel: sshd(2659): dirtied inode 533395 (libwrap.so.0) on sda1 Mar 14 19:17:23 localhost kernel: cat(2672): dirtied inode 888805 (.bash_history) on sda1 Mar 14 19:17:46 localhost kernel: kjournald(913): WRITE block 14016 on sda1 Mar 14 19:17:48 localhost kernel: pdflush(104): WRITE block 12487672 on sda1 Note that I haven't used this since those articles were written. I will assume that things are still similar now ten years later. But it has been ten years. I expect some things to be different. But by investigating those features you should be able to tell exactly what is hitting your disk. Bob
signature.asc
Description: Digital signature