EeePC hangs with Firefox

I’ve done some more work on figuring out why my EeePC literally freezes for a second and more at a time when I work with Firefox. I used LatencyTOP to track this down and think that I have put together the pieces of this puzzle.

The reason this hits me especially hard is a combination of several independent issues:

  1. Firefox 3 uses sqlite which aggressively uses fsync to make sure that the on disk database of websites visited stays in sync. The corresponding bug is marked as resolved, fixed but I would consider that a serious overstatement.
  2. Ext 2 and 3 have a bug where an fsync on a file actually forces a sync on the disk. This, too, has been discussed before.
  3. Many MLC SSDs have a problem with many small writes at once (this was discussed in extensive detail in this great AnandTech article).
  4. Finally, as I mentioned before, there appears to be something wrong with the MLC drive in my EeePC 1000 (I’m still waiting for the 32GB SLC drive (and, just to do comparisons, a 64GB MLC drive) from MyDigitalSSD). And since I have my complete Fedora installation on the secondary drive, all writes to temp files and log files add to the write delays.

It gets so bad that LatencyTOP show the system stalled for 1500ms just waiting for one Firefox fsync to complete.

So what can you do to fix this if you run into the same issue (which seriously hampers the usability of an affected system)? Well, you could put your /home directory on the SLC (/dev/sda) in your EeePC. But that’s not really a good solution as most of us want to use the large drive in order to have space for all of our files.

You could switch to a different filesystem. But Fedora (and many other current distributions) are very much built around the assumption that you are using Ext 3. And it seems that ReiserFS isn’t any better in that respect. The filesystem that will fix the problem, BTRFS is still not quite ready for real life deployment.

Finally, you could put a small partition on your SLC drive, and move your .sqlite files (in the .mozilla/firefox/randomlettersprofile directory) onto that drive. I tried that and it didn’t help, either.

So I’m still searching for a solution.

Update: I think I have at least a partial solution.

Thanks for visiting!
I hope this was helpful - if not, please leave a comment and let me know why! Were you searching for something else? Did I miss an important aspect?

5 Comments so far

  1. gm on November 9th, 2008

    Thank you. I have the same issue here, and I’m also searching for a solution. Even worse, The issue seems to also affect Evolution now that it uses sqlite as well. Hope there will be a solution anytime soon. Thanks to keep us informed.

  2. [...] a commenter on my previous post on this topic has pointed out, the same problem (the system stalls when due to Ext3’s bad [...]

  3. [...] EeePC Hangs with Firefox [...]

  4. [...] (aktueller) FF unter Ubuntu mit Ext3-Filesystem hängt seit einer Weile regelmäßig rum, u.a. wie hier beschrieben. Keine verdächtige CPU-Auslastung, keine großen Datenmengen - trotzdem ein riesiges [...]

  5. Koslowski on November 21st, 2008

    Auf der eeeBox habe ich dasselbe Problem: minutenlanges hangen von FF. ubuntu-eeepc v.8.10 installiert auf SDHC.

    Nach Lektüre des einleitenden Beitrags, den ich als Laie nur zur Hälfte verstehe, habe ich das Problem für mich wie folgt gelöst:

    Vorbereitung:
    mv /home/user/.mozilla/firefox /home/user/.mozilla/foxfire;
    ln -s /mnt/ramdisk /home/user/.mozilla/firefox;

    rc.local:

    mount /dev/shm/ -t tmpfs /mnt/ramdisk;
    cp -r /home/user/.mozilla/foxfire/* /home/user/.mozilla/firefox/. ;

    Vor dem Herunterfahren muß dann der Inhalt von /mnt/ramdisk gesichert werden:

    cp -r /mnt/ramdisk/* /home/user/.mozilla/foxfire/.

    Die Verknüpfung mit reboot/shutdown muß ich noch herausfinden.

    Bei einem Absturz der aktuellen Sitzung ist natürlich der neue Inhalt weg.

    Die Hänger sind weg. Wahrscheinlich sollten weitere Dateien (tmp,var) auf die RamDisk, um eine weitere Beschleunigung zu erreichen.

    Einschränkungen des Arbeitsspeichers habe ich noch nicht beobachtet. Der Swap-Bereich wird nicht in Anspruch genommen, es gibt immer noch free-memory.

    K.

Leave a reply