Mini Spy

Loading...

Latest Threads

Loading...
 

Speed up Chrome & Firefox by using a RAM disk

Discussion in 'Tweak & Secure Windows' started by MrXidus, Jun 21, 2012.

?

Will you be giving RAMDisk a try?

  1. Yes

    11 vote(s)
    36.7%
  2. No

    13 vote(s)
    43.3%
  3. I would if I had the RAM to spare.

    6 vote(s)
    20.0%
  1. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    [​IMG]

    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:

    [​IMG]

    [​IMG]

    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.

    [​IMG]

    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.
     
  2. ChromiumHF

    ChromiumHF New Member

    Joined:
    Dec 19, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    10
    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.
     
  3. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    1 GB = 1073741824 bytes
    2 GB = 2147483648 bytes

    There are free online conversion calculators on Google. :)
     
  4. ChromiumHF

    ChromiumHF New Member

    Joined:
    Dec 19, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    10
    Thanks for the fast reply! - can you please link the online converter which you use? :)
     
  5. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    Sure. :)

    http://www.t1shopper.com/tools/calculate/
     
  6. ChromiumHF

    ChromiumHF New Member

    Joined:
    Dec 19, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    10
    Thanks! ;)
     
  7. pcjunklist

    pcjunklist Regular Member

    Joined:
    Dec 28, 2011
    Messages:
    497
    Likes Received:
    4
    Trophy Points:
    47
    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.
     
  8. AbdelwahaB

    AbdelwahaB New Member

    Joined:
    Jun 27, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    2
    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 ?
     
  9. jamescv7

    jamescv7 Active Member

    Joined:
    Mar 15, 2011
    Messages:
    6,130
    Likes Received:
    15
    Trophy Points:
    137
    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.
     
  10. woomera

    woomera Regular Member

    Joined:
    Jan 15, 2012
    Messages:
    468
    Likes Received:
    82
    Trophy Points:
    92
    loosing login sessions everytime i close the browser is a real downside for me so i wont be using this but thanks for sharing.
     
  11. Abdelwahaab

    Abdelwahaab New Member

    Joined:
    Jul 17, 2012
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    10
    thnx fot the tutorial
     
  12. samhfoley

    samhfoley New Member

    Joined:
    Aug 22, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  13. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    samhfoley, sounds like the RAMDisk isn't running. Find the correct drive letter for your RAMDisk and enter --disk-cache-dir="HERE:/"
     
  14. samhfoley

    samhfoley New Member

    Joined:
    Aug 22, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  15. grimreaper1014

    grimreaper1014 Regular Member

    Joined:
    Jul 9, 2011
    Messages:
    121
    Likes Received:
    24
    Trophy Points:
    37
    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?
     
  16. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    If I were you, I'd just make the cache on RAMDisk.
     
  17. grimreaper1014

    grimreaper1014 Regular Member

    Joined:
    Jul 9, 2011
    Messages:
    121
    Likes Received:
    24
    Trophy Points:
    37
    Cool thanks for the advice. How much space should I use? I have 8gb of Ram total.
     
  18. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    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.
     
  19. Abdelwahaab

    Abdelwahaab New Member

    Joined:
    Jul 17, 2012
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    10
    Ram disk drive is created but i cant configure browsers ? no browsers is working under Ram Disk and folder is empty
     
  20. MrXidus

    MrXidus Super Moderator MalwareTips Staff

    Joined:
    Apr 17, 2011
    Messages:
    2,203
    Likes Received:
    457
    Trophy Points:
    243
    In this thread, Copy and paste the shortcut target you made exactly.
     

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
MalwareTips.com is an independent website.All trademarks mentioned on this page are the property of their respective owners.