Wednesday, June 30, 2010

Speed up your web-browser using a Ram-Disk (XP, OSX, Linux)

Background: Your web-browser be it Internet Explorer, Firefox, or other temporarily saves the viewed pages and images to it's cache. This cache resides on your hard-drive which generally is the slowest part of your computer. By changing this cache location to memory, you can significantly increase your browser speeds. If you are using a modern SSD (Solid State Drive) then this will not have a speed impact, but could reduce the number of writes to the SSD and therefore is also a good option.

I've found this technique while googling and have implemented it on each of my machines as a speedup technique.

I'll briefly cover Windows XP, Mac OSX, and Linux. Although this technique could be used with WinVista or Win7, I have been unable to find a FREE Ram-Disk software.

You can implement the configuration, and if you decide the benefit is nil, then it's easily reversible.

For Windows XP, there are several free Ram-Disk software, but I have had the least (if any) problems with VSuite RamDisk Free Edition. Install this software and create a RamDisk. I chose to assign drive letter Z: and will reference that here. You are welcome to use any available drive, but be sure to use that drive letter with the configurations to follow. A drive size of 64 or 128 MB is plenty sufficient for a web-browser cache. If you heavily use two or more browsers you could easily choose 256MB if your computer has 2GB or more RAM.

I'll explain how to configure Internet Explorer and Firefox. If you use another browser, there is certainly some information online to assist with your browser specific settings.

For Internet Explorer go to Tools>Internet Options>Browsing History>Settings>Move Folder. Make note of the curent folder name in case you wish to revert. For the Move Folder option, choose the RamDrive letter Z: and use a temp folder (i.e. Z:\temp ). While you are at it, change the Disk Space to use option to something more appropriate, i choose 64MB.

For FireFox 3+, enter "about:config" in the address bar. You'll see a warning screen, click the "I'll be careful" button. Right-click anywhere in the list of items and select New>String. Enter "browser.cache.disk.parent_directory" (no quotes), then enter your RamDrive letter and folder as the new value (i.e. Z:\temp). If you are using an older Firefox you may want to search first as i think the key name is different.

I doubt that you will want to revert back, but if so, then you can set Internet Explorer to the original folder that you noted. If you wish to reverse Firefox, simply delete the newly created key.

The same concept will work on Mac OSX. You can use Michaël Parrot's Esperance DV or Peter Hosey's MakeRAMDisk 1.0 to create a RamDrive.

Ubuntu users can use the existing ram-disk mount named "/dev/shm" as your cache folder. I use this one for every Ubuntu or Mint Linux machine I have. For other Linux distributions with kernel 2.4+, use the commands "sudo mkdir /mnt/ramdisk" then "sudo mount none /mnt/ramdisk -t tmpfs" to create a dynamically sizing RamDisk. This can likely be scripted into your startup. There are other resources available so research your preferred method.

On any older machine you should undoubtedly see a significant increase in browser speed. Newest machines may not see as much a boost, but you can be the judge of that.

No comments:

Post a Comment

Comments, Suggestions or "Thank you's" Invited!