On Linux,I'm using the Iceweasel web browser (it's effectively Firefox), and in
Edit/Preferences/General/Startup, when I type a URL into the "Home Page" box,
the hard disc light comes on for EVERY press of a key (eg www.google.com). This
seems odd (and unnecessary). I've tried entering text in other boxes in
Preferences, and the disc light DOESN'T come on.
Do you know why the disc light is coming on, and does it suggest that something
sneaky and malevolent is happening?
Best Answer
The short answer
No, it's probably not malevolent. It appears Iceweasel writes its preferences file after every keystroke.
The long answer (how to find out)
The same thing happens here.
There is a way to determine exactly what's going on, by using the kernel's block-access dump feature. All of the below is done as root:
First, you need to stop the kernel logging daemon—otherwise, there will be lots of activity: writing the kernel log to disk. On my machine, it's part of rsyslog, so I do:
Now, in another terminal,
cat /proc/kmsg
. This will spit out the kernel logs, without writing them to disk.Finally,
echo 1 > /proc/sys/vm/block_dump
to turn the block dump feature on. You should fairly quickly see output in thecat
terminal, at least one line for each time the disk light blinks.If there are far too many lines (there are here, because of a bunch of stuff running) you can use
grep
to filter them. E.g., you could usegrep 'dirtied inode' /proc/kmsg
orgrep iceweasel /proc/kmsg
Then go ahead and type in the preferences box to see what disk activity there is. Once you've found out, run
echo 0 > /proc/sys/vm/block_dump
to turn off the block dump, and start back up your kernel logger (/etc/init.d/rsyslog start
here)Here is what I got:
So, what's happening is that every time you type in that field, Iceweasel immediately writes it to the preferences file. Then, on my system, it passes through LVM (the dm-3 stuff) an becomes a physical write to 4 disks (due to mdraid).