[2324] in athena10

home help back first fref pref prev next nref lref last post

Decoupling Firefox from AFS slowness

daemon@ATHENA.MIT.EDU (Kenneth Arnold)
Sat Apr 18 18:53:46 2009

MIME-Version: 1.0
From: Kenneth Arnold <kcarnold@MIT.EDU>
Date: Sat, 18 Apr 2009 18:53:19 -0400
Message-ID: <d4d4976a0904181553t64ec7c6dp57a66a28e76dd3ef@mail.gmail.com>
To: debathena@mit.edu
Content-Type: multipart/mixed; boundary=00221532c758ba4bc80467dc2a99

--00221532c758ba4bc80467dc2a99
Content-Type: multipart/alternative; boundary=00221532c758ba4bbc0467dc2a97

--00221532c758ba4bbc0467dc2a97
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Firefox has a nasty tendency to hang on AFS, especially since Fx3 switched
to using sqlite databases. I'm running off a USB key right now,
geofft-style, and noticed the same thing, so I tried to fix it.

And after hacking it together myself, I realized I'd skipped the "Google it"
step. See http://www.verot.net/firefox_tmpfs.htm ... and I thought I was
such a genius :)

So you can read the below if you want to; I had a slightly different and
possibly better approach.

---

I thought, hey, let's use a tmpfs and periodically sync changes back to the
main profile.

Then I got the silly idea that using git would ensure that everything stayed
in sync. So I made my .mozilla a git repo, added a .gitignore for
Cache,lock,*.sqlite-journal, and cloned --bare into ~/.moz.git. I'm
attaching a preliminary Firefox wrapper script that sets up and maintains a
clone of that repo in .mozilla, symlinked into a temporary directory
(assuming /tmp is a tmpfs). Now Firefox is really zippy.

Firefox is really egregiously noisy on disk, so snapshotting every 5 seconds
makes for a big repository. Fortunately, 5 seconds is insane, and git gc
packs it down a lot. But maybe rsync is a better choice for space reasons.

This could actually do something intelligent if another computer is also
trying to access the profile. e.g., if push fails, pop up a dialog warning
that further profile changes will not be saved, or provide a way to override
the competitor. But it doesn't yet.

Just throwing this idea out there :) I don't have time to make it
production-ready (THESIS! <grin>) but I got this far.

-Ken

--00221532c758ba4bbc0467dc2a97
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Firefox has a nasty tendency to hang on AFS, especially since Fx3 switched =
to using sqlite databases. I&#39;m running off a USB key right now, geofft-=
style, and noticed the same thing, so I tried to fix it.<br><br>And after h=
acking it together myself, I realized I&#39;d skipped the &quot;Google it&q=
uot; step. See <a href=3D"http://www.verot.net/firefox_tmpfs.htm">http://ww=
w.verot.net/firefox_tmpfs.htm</a> ... and I thought I was such a genius :)<=
br>

<br>So you can read the below if you want to; I had a slightly different an=
d possibly better approach.<br><br>---<br><br>I thought, hey, let&#39;s use=
 a tmpfs and periodically sync changes back to the main profile.<br><br>

Then I got the silly idea that using git would ensure that everything staye=
d in sync. So I made my .mozilla a git repo, added a .gitignore for Cache,l=
ock,*.sqlite-journal, and cloned --bare into ~/.moz.git. I&#39;m attaching =
a preliminary Firefox wrapper script that sets up and maintains a clone of =
that repo in .mozilla, symlinked into a temporary directory (assuming /tmp =
is a tmpfs). Now Firefox is really zippy.<br>

<br>Firefox is really egregiously noisy on disk, so snapshotting every 5 se=
conds makes for a big repository. Fortunately, 5 seconds is insane, and git=
 gc packs it down a lot. But maybe rsync is a better choice for space reaso=
ns.<br>

<br>This could actually do something intelligent if another computer is als=
o trying to access the profile. e.g., if push fails, pop up a dialog warnin=
g that further profile changes will not be saved, or provide a way to overr=
ide the competitor. But it doesn&#39;t yet.<br>

<br>Just throwing this idea out there :) I don&#39;t have time to make it p=
roduction-ready (THESIS! &lt;grin&gt;) but I got this far.<br clear=3D"all"=
><br>-Ken<br><br>

--00221532c758ba4bbc0467dc2a97--
--00221532c758ba4bc80467dc2a99
Content-Type: application/octet-stream; name=firefox
Content-Disposition: attachment; filename=firefox
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ftow79o50

IyEvYmluL2Jhc2gKc2V0IC1lCgppZiBbWyAhIC1kIH4vLm1vemlsbGEvZmlyZWZveCBdXTsgdGhl
bgoJZWNobyAiQ3JlYXRpbmcgdGVtcCBGaXJlZm94IGNoZWNrb3V0LiIKCVRFTVBESVI9JChta3Rl
bXAgLWQpCgllY2hvIFRlbXA6ICRURU1QRElSCglsbiAtc1QgJFRFTVBESVIgfi8ubW96aWxsYQoJ
Y2Qgfi8ubW96aWxsYQoJZ2l0IGNsb25lIH4vLm1vei5naXQgbWFzdGVyCgltdiBtYXN0ZXIvKiBt
YXN0ZXIvLmdpdCogLgoJcm1kaXIgbWFzdGVyCmVsc2UKCWVjaG8gIlVzaW5nIGV4aXN0aW5nIC5t
b3ppbGxhLiIKCWNkIH4vLm1vemlsbGEKCWdpdCBwdWxsIHx8IGVjaG8gIlBVTEwgRkFJTEVEISIK
ZmkKCi91c3IvYmluL2ZpcmVmb3ggIiRAIiAmCgpmdW5jdGlvbiBzeW5jLWZ4IHsKCWdpdCBhZGQg
LUEKCWdpdCBjb21taXQgLW0gaW5jIHx8IHsKCQlpZiBbWyAkPyAhPSAxIF1dOyB0aGVuCgkJCWVj
aG8gIkNPTU1JVCBGQUlMRUQhIgoJCWZpCgl9CglnaXQgcHVzaCB8fCBlY2hvICJQVVNIIEZBSUxF
RCEiCn0KCndoaWxlIHRydWU7IGRvCglzbGVlcCA1Cglqb2JzIC1wCglpZiB0ZXN0IC16ICIkKGpv
YnMgLXByKSI7IHRoZW4KCQllY2hvICJGaXJlZm94IGV4aXRlZC4iCgkJYnJlYWsKCWZpCglzeW5j
LWZ4CmRvbmUKCnN5bmMtZngKCg==
--00221532c758ba4bc80467dc2a99--

home help back first fref pref prev next nref lref last post