Smoothwall Firewall project

Thursday, 11 November 2010

Speeding up your Linux browser using a ramdisk



I came across an interesting article yesterday, about someone who had speeded up their browser on Windows by using a ramdisk, and knowing that Linux can happily do this, I decided to write down how to do this for the Linux user.

Firstly we need to create a directory that we can use for the ramdisk, and get it to automatically mount everytime we start our machine.

1) create the directoty - sudo mkdir /var/ramdisk
2) then edit this file and add the following line at the end - gksudo gedit /etc/fstab
/var/ramdisk /var/ramdisk tmpfs size=512m 0 0
3) Now mount this new ramdisk to test
sudo mount /var/ramdisk

We now have our ramdisk, and we can add this to the start options for Chromium and Firefox.

Firstly we will do Chrome as it's the easiest, simple add the following line to the startup options/icon that your use to start Chrome.

--disk-cache-dir=/var/ramdisk

See below:


If you now click on Chrome, you will now be using a Ram disk, and you can look at what you are storing in that cache, but looking in the directory you created earlier.

Now, for firefox we use a different method,

Mozilla Firefox

  • Type about:config into the address bar, accept the warning ("I'll be careful, I promise!")
  • Right click > New > String
  • Type browser.cache.disk.parent_directory into the box and press OK
  • Type the path of your BrowserCache directory -- /var/ramdisk press OK
  • Close all open Firefox tabs and windows
  • Open the browser again
(Part of the above section was lifted directly from this web page to save typing - http://goo.gl/RKr7z)

That's it, you now have you cache being stored in RAM instead of on disk, which is significantly faster, for saving and reading cached pages. I have started with a RAM disk of 512m, which may be too large for you or too small, but you can adjust that once you see what your usage profile is like.

Wednesday, 10 November 2010

Is upgrading to the Intel i5 laptop processor worth the effort


In a word, yes . As you may have read on this blog a few weeks ago , I tried an experiment with using an SSD harddisk for the operating system in conjunction with an external 500GB hybrid disk for all the more volatile parts of the OS, like /var and /tmp.

This was a resounding successful with a marked ramp in performance across the whole operating system and applications, to the point now , that all other machines seem like sloth's in comparison.

I had a need to upgrade my work laptop recently, specifically for more CPU cores and access to that lastest hardware virtualization extensions. I use the laptop extensively for virtualization, so I picked the Dell Latitude E6410. This is a really good work horse, but more importantly it comes with the Intel i5 processor.

This has had a very positive affect on the whole systems performance when running virtual guests with VirtualBox - my current virtualization platform of choice - to the extent that I can now over commit on memory and cpu's , plus the density I can achieve on this box has literally doubled.

I always keep a system monitor going to see how hard the system us working, and while on the old E6400, with two virtual machines running , the system would be noticeable slower, now with four virtual guests running, there is still plenty of head room for the other applications I need to run.

If are about to upgrade, and you need the ability to run multiple virtual guests, then I would definitely recommend the extra spend on this processor. The more memory the better, but I'm happily working with 4GB currently, but I can take this up to 8GB if the need should arise.

Well done Dell this is a grand machine for running Linux.