Today, I was getting more and more annoyed with my current slowdown. It is not as bad as the other one (30 seconds of beach ball of death, 5 seconds of work, rinse and repeat). I have noticed that the system writes and reads from the disk quite a lot but I have not been sure what it is doing. LSOF is a difficult way to catch something that transient. The new slowdown is a fraction of a second complete pause in FF. Depending on system load and CPU it might be more or less often or slightly longer. I actually thought it was Flash missbehaving at first. Anyways, in today's search for FF pauses, I found a website for an ISV: http://forums.whirlpool.net.au/forum-replies-archive.cfm/836951.html They talk about pauses and mention monitoring the file system with fs_usage several pages down. I tried this and was flooded with file system messages.
sudo fs_usage -f filesys
Lots and lots of messages. FF was one of the major contributors. I piped the output to a file and tried using tail in another shell to monitor the disk activity.
sudo fs_usage -w -f filesys > biglog.txt
tail -f biglog.txt
Unfortunately, tail was causing a flood of messages of its own. Way more than the actual traffic. Without tail, it was hard to figure out what was happening. The biglog file was 150MB and many of the commands and filenames were chopped. I tweaked the parameters to fix that '-w' and hone in on FF.
sudo fs_usage -w -f filesys firefox-bin > biglog2.txt
Now I have a list of just FF is doing. I started using the program, waited for the hiccup, and immediately hit ctrl-c in the shell window. The log contained lots and lots of line items. Lots of seeks, truncates, ... There was only one file name mentioned however:
es/Firefox/Profiles/23oitqok.default/Google Gears for Firefox/permissions.db-journal
I quickly disabled the add-on and restarted FF. Once restarted FF no longer exhibits the issue that I was seeing before. While writing this article, I looked on my disk for the file. I wanted to see how big the file is/was. I could not located it. I also could not locate it on the backup. After finding the documentation for the Gears API, I was able to locate the files. Thanks to Google for documenting all of the file locations for every OS and browser combination. All of the files are small. I am not sure why the journal would be big, but it is gone now. I don't know how big it was and I cannot find the file in TimeMachine.
On a positive note, my system has not had a single hiccup since I disabled the add-on. I can live with a slight mystery without the odd pauses. Also, during my search for the file I could not locate, I was performing find commands over large portions of my HDD, specifically:
find . -name "permissions.db-journal"
This reasonable amount of disk activity did not cause the browser to hiccup at all. I am impressed, I thought the system was very susceptible to HDD activity based delays. It might have been only HDD activity was slowing down the blocking HDD activity the browser was trying to get done.