

(Windows) Move the Firefox or Chrome cache to a RAM disk and speed up surfing - erikano
http://www.downloadsquad.com/2010/11/10/how-to-move-the-firefox-or-chrome-cache-to-a-ram-disk-and-speed/

======
nodata
If you're manually managing your ram, then something is very broken.

------
stagas
I've been using a Ram disk as the TEMP folder on Windows for more than a year
and the overall speed of the system is quite better than without it, and
certainly quite less disk activity. You can change the temp folder location in
the enviroment settings.

The advantages besides speed are, the temp folder cleans up every time you
restart, it's also useful for storing anything disposable, an archive you'll
need to download only once and use its contents, and useful for doing anything
potentially unsafe for your regular disk.

The disadvantage for setting your temp folder to the ram disk is that
sometimes, some programs will try to store a lot of data on the temp folder
and fill it up (I use 384mb), but that's something you can usually change in
the programs' settings.

------
cloudwalking
If you have a lot of tabs open this may not be a good idea. The OS may end up
paging more often - especially when switching to and from the browser. This
causes uncomfortable wait times while the harddisk thrashes.

~~~
timrobinson
Right - I'm skeptical that using a RAM disk like this has a benefit on any
current OS.

The idea of a RAM disk being quicker than a real disk -- when memory is backed
by the file system, and the file system has a cache in front of it -- sounds a
lot like 1975 programming: <http://www.varnish-
cache.org/trac/wiki/ArchitectNotes>

------
wccrawford
There's a lot of 'that doesn't make sense' comments here, but let me tell you,
it CAN make a difference.

My linux machine was having issues with one of its hard drives (an external
one) being slow to access. For some reason, chrome would decide to hit that
drive once in a while and that would halt everything for a few seconds while
it did so. I told it to stop using disk cache at all and suddenly everything
is much nicer.

With apps waiting on disks for -any- reason, it doesn't surprise me that
making the temp dir be ultra-fast helps.

------
PStamatiou
For OS X, you can create a RAM disk like so:

    
    
      diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
    

ex:

    
    
      Initialized /dev/rdisk4 as a 569 MB HFS Plus volume
    

works for me in firefox. but doesn't really seem faster, probably because my
main disk is an ssd raid array.

<http://dl.dropbox.com/u/186198/Screenshots/7k4b.png>

~~~
brunoqc
Isn't speedtest for the bandwidth?

Maybe you should try to find speed tests for browsers, like at
[http://www.webdevelopersnotes.com/articles/test-browser-
spee...](http://www.webdevelopersnotes.com/articles/test-browser-speed.php)

~~~
PStamatiou
that was just an open tab and not related to my ramdisk setup tinkering

------
lemming
I'm not sure 20% is worth the hassle, to be honest. I did an experiment like
this recently with our project compilation. Our project's pretty big, 875k LOC
Java according to SLOCCount, and takes around 15 mins to do a clean build on
my workstation. I tested putting all the source, output dirs and ivy cache in
a RAM disk, and was really surprised that it made less than 20% difference. I
guess disk caches are really good these days.

------
erikano
In FreeBSD, you can create a RAM Disk by doing:

 _mkdir -p /mnt/ramdisk_

 _/sbin/mdmfs -s 256M md10 /mnt/ramdisk_

------
bitboxer
Sorry, but this is stupid. Your Os already caches files in your ram. No need
for a Ram Disk.

------
ZeroGravitas
I've heard just increasing the size of the cache can have noticeable impact.
So much so that they're going to increase the default (or maybe already have
in the latest versions).

------
known
In Ubuntu,

    
    
        vi /etc/sysctl.conf
        vm.swappiness = 0

------
ghshephard
Can someone explain why a Ram Disk has any advantage over cache based disk?

~~~
larsberg
Most ramdisks map memory non-pageable. So, no matter how long those files have
been sitting around, they will still be memory-resident, even long past the
the time the files would either be not in the on-disk cache or still held in
memory by the OS cache manager.

