Guide | How To Speed up Chrome & Firefox by using a RAM disk

The associated guide may contain user-generated or external content.

MrXidus

Super Moderator (Leave of absence)
Thread author
Apr 17, 2011
2,503
897
1,667
Australia
lOLJ3.png


Moving your browser's cache to a RAM disk

It’s no secret that Google’s Chrome browser is fast. Really fast. But with a little help from our friend the RAM disk, we can make it even faster. If you’ve never used a RAM disk before, you’ve been missing out on a potential speed increase, especially those of you on laptops who often have slower hard drives than their desktop counterparts, but plenty of RAM.

What’s a RAM disk?

As the name suggests, a RAM disk is a virtual disk drive mapped to a specific amount of RAM. As RAM is considerably faster than hard drives, we move our browser’s cache to the RAM disk and greatly increase cache read and write times. *However, this comes at a flaw: RAM, by nature, is volatile and is flashed whenever the PC is turned off or rebooted. Your login information will be lost every time you reboot your PC. While this is better on a security standpoint, it does tend to get annoying to constantly have to login to the same sites over and over. You also lose a little bit of RAM, but in most cases, the difference will be negligible or downright invisible.

*Note: That this can now be avoided thanks to the Load & Save feature now implemented in RAMDisk. Instructions on how to do so below under "Configuring the volatile RAMDisk so it becomes non-volatile".

Download and Configure RAMDisk

We’ll be using the RAM Disk application by Dataram. It’s free and works on Windows XP X86 to Windows 7 X64. It’s also very simple to configure. Keep in mind that the free version will have an ad when launched, but does not have pop-ups.

Download and install as prompted.

Configuration

  1. Launch the RAMDisk Configuration Utility application from the Start Menu, under Dataram RAMDisk.
  2. In the Disk Size box, enter 200MB. (Note I am just using 200MB for this guide, The amount you wish to use depends on how much RAM your PC has to spare. I have 8GB RAM so I made my RAMDisk 2GB)
  3. In the filesystem options, select FAT16. (unless you’re creating a very large RAMDisk >4GB)
  4. In the boot system options, leave the default as Windows.
  5. Hit the Start RAMDisk button and wait.

It’ll take a minute or two to create the disk. Once it’s done, a new drive will appear in My Computer.

My RAMDisk:

S3YPn.png


tGT7i.png


Configuring your browser

Google Chrome

Chrome, unfortunately, does not currently have an easy-access GUI to change advanced settings. We’ll need to use switches. Right-click your Chrome shortcut and select Properties from the menu. We need to add the following switches to our shortcut.

Change the cache’s directory, where the G: drive should be changed to reflect the location of your RAM disk. [Example Image]
Code:
--disk-cache-dir="G:/"

Change the cache size. In bytes; the example below is 200MB.
Code:
--disk-cache-size=209715200

Here’s an example of a complete shortcut.
Code:
C:\Users\MrXidus\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-dir="G:/" --disk-cache-size=209715200

Mozilla Firefox

Firefox settings can be changed from the configuration panel (about:config) where a few settings will need to be changed.

Change the cache’s directory, where the G: drive should be changed to reflect the location of your RAM disk. If the key doesn’t exist, create a new String.

Key / Value

Code:
browser.cache.disk.parent_directory

Code:
G:\

Change the cache size. In bytes; the example below is 200MB.

Key / Value

Code:
browser.cache.disk.capacity

Code:
209715200

Opera

  1. Open a new tab in Opera.
  2. Paste this into the URL bar, and press enter: opera:config#UserPrefs|CacheDirectory4
  3. This will take you to the configuration page, to change your cache directory.
  4. Now create a folder on your RAMDisk, called “operacache”.
  5. Enter the path to your “operacache” folder, on your RAMDisk, in the “Cache Directory4″ settings.
  6. Remember to hit Save at the bottom of the “User prefs” settings list!

Configuring the volatile RAMDisk so it becomes non-volatile

The way the RAMDisk is set up for now, it will delete all files on the RAMDisk when it is stopped (volatile).

If you want the files to be stored, you can click on the Load and Save tab, where we can set the content of the disk, to be loaded and stored at startup and shutdown, to an image file.

If you now check “Save Disk Image on shutdown”, give it a filename, and press “Save disk image now”, then it will create the image of your RAMDisk. The image will be the same size as your RAMDisk.

Then, check the box, “Load Disk Image at Startup”, specify you image file, and optionally give your disk a label, “Ramdisk” or something describing.

Then go to File -> Save settings.

HKMWQ.png


Tips By MrXidus:

Once you have completed the steps above, Within your selected browser, Browse your most visited websites, Once they have been cached, You'll then notice the speed improvement in loading times next time you visit the page! :)

If you don't wish for a website to be cached, (Such as visiting it for one time only and want to save space by not caching the website).
Browse the site using Chromes Incognito Mode or Firefox Private Browsing as these disable the caching of temp files, cookies etc.

You can use CrystalDiskMark to test the read and write speeds of your RAMDisk compared to your regular HDD.
My result here.

Source: Thanks to SteelFrog for the original guide. I have built upon this but do not claim or endorse this work. I am simply sharing knowledge.
 
ChromiumHF said:
Hay MrXidus thanks for the tutorial!

How do you calculate GB to bytes? or MB to bytes? I also configured my RAMDISK to 2GB but you haven't listed how many bytes are in 2GB.

1 GB = 1073741824 bytes
2 GB = 2147483648 bytes

There are free online conversion calculators on Google. :)
 
MrXidus said:
ChromiumHF said:
Hay MrXidus thanks for the tutorial!

How do you calculate GB to bytes? or MB to bytes? I also configured my RAMDISK to 2GB but you haven't listed how many bytes are in 2GB.

1 GB = 1073741824 bytes
2 GB = 2147483648 bytes

There are free online conversion calculators on Google. :)

Thanks for the fast reply! - can you please link the online converter which you use? :)
 
trouble is most people are still using 2-4gb of ram and can't really afford to lose any for a ramdisk. Now I tend to over ram machines because it's so cheap here in the US, I mean 16gb (4gb x 4 1600mhz) a month ago was about $80 and I picked up 32gb (8gb x 4, 1333mhz) for $200.
 
thnx Bro i feel i buy anew pc no lagg in flash videos ,But i have a qusetion my Ram Disk not appeared like when it was just created ! should i worry about that ?
 
Make sure that contribute the RAM itself equally since the other portion will use on other task and could take it a bit slowdown performance if happens.
 
loosing login sessions everytime i close the browser is a real downside for me so i wont be using this but thanks for sharing.
 
Thanks for this tutorial. Very nice. I tried making a 2GB RamDisk, which I calculate to be 2147483648 bytes. However when I enter into firefox new Integer browser.cache.disk.capacity value 2147483648 it tells me that the text I entered is not a number?!? Please advise. I went ahead and used that value with Chrome, just wondering what is up with Firefox. Thanks :huh:

Chrome also gave me an error when I modified it to be
C:\Users\Sam\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-dir="L:/" --disk-cache-size=2147483648
 
samhfoley, sounds like the RAMDisk isn't running. Find the correct drive letter for your RAMDisk and enter --disk-cache-dir="HERE:/"
 
MrXidus said:
samhfoley, sounds like the RAMDisk isn't running. Find the correct drive letter for your RAMDisk and enter --disk-cache-dir="HERE:/"

Without the " " right? I have stopped RamDisk, restarted it again and tried
C:\Users\Sam\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-dir=L:/ --disk-cache-size=2147483648 as well as C:\Users\Sam\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-dir="L:/" --disk-cache-size=2147483648
and neither work. Not sure what's going on here.
 
Hi guys I'm looking for a way to speed up Firefox when playing Facebook games as well as browsing the web etc. I'm not familiar with how to make ram disks. Do I want to install Firefox to the ram disk, or do I just want to create a cache for Firefox?
 
grimreaper1014 said:
Hi guys I'm looking for a way to speed up Firefox when playing Facebook games as well as browsing the web etc. I'm not familiar with how to make ram disks. Do I want to install Firefox to the ram disk, or do I just want to create a cache for Firefox?

If I were you, I'd just make the cache on RAMDisk.
 
MrXidus said:
grimreaper1014 said:
Hi guys I'm looking for a way to speed up Firefox when playing Facebook games as well as browsing the web etc. I'm not familiar with how to make ram disks. Do I want to install Firefox to the ram disk, or do I just want to create a cache for Firefox?

If I were you, I'd just make the cache on RAMDisk.

Cool thanks for the advice. How much space should I use? I have 8gb of Ram total.
 
grimreaper1014 said:
Cool thanks for the advice. How much space should I use? I have 8gb of Ram total.

Depends on how many websites you browse daily, I visit many websites so I need extra space to cache it all.

I also have 8GB RAM and I decided to make a 2GB RAMDisk.
 
Ram disk drive is created but i cant configure browsers ? no browsers is working under Ram Disk and folder is empty
 
Abdelwahaab said:
Ram disk drive is created but i cant configure browsers ? no browsers is working under Ram Disk and folder is empty

In this thread, Copy and paste the shortcut target you made exactly.