Sean Middleditch » 2008 » June
I’ve been meaning to upgrade to a newer and FOSS-supported video card. Since I like nice, quiet, low-power systems, that requires an integrated graphics chip. My current motherboard makes use of an NVIDIA 6150, but I really would like either an AMD 780G or Intel X4500 (when they’re out).
Since I had a birthday recently and my parents were bugging me to ask them for something, I decided to ask for a 780G motherboard. I then went and bought DDR2 RAM and a Phenom X4, as my old Athlon X2 is a socket 939 model.
The new motherboard unfortunately was a huge problem. It would hang randomly on boot, gave Linux various errors, and caused some instability. I figured it could also be the CPU or RAM, but it’s really hard to find out when you don’t have anything else to swap in. I had my parents return the motherboard and a bought a new one, which came recommended from Phoronix.
That one wouldn’t even power on.
At this point, I’m pretty much sick of pulling my computer apart and putting it back together over and over. If the replacement motherboard doesn’t work (or it turns out to the CPU or RAM) then I’m just going to send it all back and say “screw it.” Maybe I’ll try again when the Intel GMA X4500 motherboard are out, maybe I’ll just get a cheap R600-based PCI-E card and stick it in my current machine, or maybe I’ll just live with the proprietary-driver necessary for my current graphic chips. (Yes, necessary - neither of the Open Source drivers nor the VESA driver are capable of giving me a usable desktop on my monitor - I either get stuck with a tiny-ass resolution, a missing mouse cursor, or a picture that’s offset by about 50% vertically.)
Putting computers together can be kind of fun, but it’s not at all fun when putting new ones together requires you to pull apart your one and only working computer, and hoping nothing goes wrong and damages your existing working parts in the process. And I really don’t feel like having to order a new case (which costs almost as much as a CPU these days - WTF?) and hard disk just to be able to try over and over to build a new machine until Newegg manages to ship me working parts. :/
The sqlite/fsync behavior of Firefox that’s been so heavily publicized lately is biting me in the ass, and hard. When Firefox is open, my machine frequently starts churning the disk, and any application which needs to write to the disk grinds to a halt. The second these 15-25 second pauses are done another one usually starts. It is quite literally driving me out of my mind in frustration.
For whatever reason, Fedora does not seem interested in fixing the issue. Despite Mozilla’s recommendation to apply a patch to fix the issue, Fedora will not do so (according to the bug report). I don’t know if 3.0 RC2 fixes the bug upstream, but even if it does, there are no Firefox updates for Fedora. I’m pretty much on my own here.
I tried to use a simple fsync wrapper with LD_PRELOAD, but I could not for the life of me get it to work. I don’t know why, as logically it should work just peachy. The library gets pre-loaded, but the wrapper functions just never get called. I’ve done this sort of thing before I was fairly confident that I was doing everything right, but the fact that it didn’t work clearly indicates I overlooked something.
My current “hack” is rather extreme, but it’s doing the job wonderfully. Given that I have an excess of RAM in this machine (2GB is more than I need… and I’m adding more in a week or two), I decided to create a tmpfs filesystem with a limit of 500MB, backed up my .mozilla directory, put a copy on the tmpfs filesystem, and symlinked ~/.mozilla to that. Since fsync is now essentially a no-op, I no longer get greats amount of disk churn.
It’s worth noting that some of the other programs i use probably contributed to the excessive churn. Pidgin writes to disk way too often (there are bugs open upstream on this), and for whatever reason it fsyncs even on the unimportant ones, like buddy icon caches. Evolution caches mail on the disk. Vim is constantly writing its swap file and fsyncing left and right. It probably shouldn’t be too much of a surprise that a ton of processes are building up data to be written out, fsyncing, and while blocked more data is built up, just to be followed by another fsync.
Particularly frustrating though is that even when I’m not actively using Firefox — it’s open, but on another workspace, not being interacted with, not even with sites using JavaScript or automatic page refreshes — it still manages to make my disk churn. Likewise, Pidgin seems to be writing files out at various points in time even though nobody is IMing me, nobody’s status is changing, my preferences aren’t changing, etc.
In any event, the tmpfs thing works. I just hope I remember to copy the data back to my real ~/.mozilla before I shut down the computer, because I actually do like to keep my history. I just want it to work like Firefox 2 where keeping my history did not require sacrificing my I/O throughput and sending my disk drive to an early grave.
Fedora Firefox Fsync Fix… Four F’s? Freakin’ Fantastic!