[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reduce the server load by asking firefox to not cache on disk



Hello

On Wed, May 15, 2013 at 10:50:13PM +0900, nigel barker wrote:
> On 15 May 2013 21:55, Petter Reinholdtsen <pere@hungry.com> wrote:
> > My friend Alf Tonny Bätz in Narvik told me that he changed the Firefox
> > setup to disable disk caching, to reduce the network traffic on the
> > diskless workstations and reduce the load on the server.
> >
> > This is the change he did in
> > /usr/lib/firefox/default/preferences/firefox.js:
> >
> > // Prevent disk loading, cace to mem
> > pref("browser.cache.disk.enable", false);
> > pref("browser.cache.offline.enable", false);
> > pref("browser.cache.memory.enable", true);
> > pref("browser.cache.memory.max_entry_size", -1);
> >
> 
> I agree. I have been using the following on plain debian workstations
> integrated into the SL network.
> 
> However, I thought they were already implemented on real skolelinux
> installs. At least they were on Lenny, I think..

We used a different approach in Skolelinux-RLP: On start of
firefox/iceweasel, we copy the local .mozilla directory containing
personal bookmarks, a (small) cache and other db/sqlite files to the
/tmp-ramdisk in a per-user/per-process directory, and on quitting
firefox, we copy them back to the users NFS home directory.

Firefox tends to exessively write on several files, not only cache data,
and in case NFS does not catch up in time, you get a "bufferbloat"
self-denial-of-service. From our tests, only exluding these files from
NFS writes was able to fix a "completely stalled" > 20 users NFS setup,
where pupils were not able to login anymore when more than ten users
were running firefox. "Outsourcing" the .mozilla directory helped.

For the firefox starter script, we made a package, it's still available
at http://rp.skolelinux.de/packages/firefox-tuning/

Regards
-Klaus


Reply to: