April 20, 2008

EEE PC: minimizing disk writes by relocating browser cache

I got my ASUS EEE PC 4G Surf on Friday. It took me all of ten minutes to decide that that default OS is pretty-much junk for a long-time Linux geek like me. SO, on Friday evening I installed EeeXubuntu. I rather fancy it. Seems like they've got the big issues worked-out, there are some asthetic issues that need to be overcome, but that's another post.

This post is dedicated to reducing disk IO on the EEE. SO, there have been others who've written about hacking /etc/fstab with mount options like 'noatime' and the like, and that is all well and fine, but here's my addition...

The overwhelming creation of temp files on my system comes from web-surfing. Therefore, I decided to make my Firefox Cache a ramdisk. This is pretty trivial, simply find your cache (usually in ~/.mozilla/firefox/SOMETHING/Cache where SOMETHING is a bunch of garbage text) and make an entry in /etc/fstab for it as follows:

tmpfs /home/USERNAME/.mozilla/firefox/SOMETHING/Cache uid=USERNAME,gid=USERGROUP 0 0

Next step is to close Firefox, delete everything in your Cache, and reboot (or do a `mount -a -t tmpfs -o remount`) and DISCO! your web browsing will all be cached.

This configuration has a couple of interesting security ramifications that I had not previously considered until I wrote-this-up... that is: 1) the forensic evidence of malicious web activity will not be stored on any disk, therefore there is virtually no forensicly sound information recoverable from the device unless it is taken "hot", and 2) since all cached data is destroyed after each boot, chances are that any malicious activity done TO YOU (i.e. malware from websites, etc.) won't be traceable either.

All of that aside, I still think for the purpose of cutting down on writes to the flash drive, this setup has merit... and it won't change my intentions of running this way.

No comments: