Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Maximize browser performance with a RAMdisk Web Browsers
I've been using excellent tips found here to enhance Firefox performance including cache2ram.

I wanted to put not just the cache, but also the Firefox profile, and even other apps on the RAMdisk and some guides were a little too complex for my capabilities. So using a combination of portable apps, Esperance DV, and Carbon Copy Cloner, I'm able to easily run Firefox and VLC from a self-auto-restoring RAMdisk that I can simply eject if I need all of my RAM for work (e.g. CS5).

First download and install Esperance DV and set up your RAMdisk with the features you require. I checked 1GB, create on opening session, save in disk image (for CCC) and self auto restore. These setting can easily be modified later, thus Esperance DV is recommended.

Download your required portable applications (like Portable Firefox) from FreeSMUG and install them on the RAMdisk. Download the latest updates to the apps and install them on the RAMdisk as well.

On my RAMdisk the cache is separate from the portable app since I had already used this LifeHacker tip.

Lastly, use Carbon Copy Cloner to backup your RAMdisk to the same .dmg file that Esperance DV is on. Select RAMdisk as the source and for the target 'Choose Disk Image' and select the .dmg file initially made for Esperance DV. At this stage you may choose to make the backup a scheduled, background process.

On SSD-only systems, reducing disk writes is key, so on a newer MacBook Pro, I'd keep the backup on an SD card in the built-in slot; otherwise a tiny USB drive might be a good location.

A script to delete the FF cache on exit would be a great addition to this tip. It's possible that another cloning app may have an option to exclude files that I've overlooked.

I've also had success using the same process with VLC portable, for smoother playback of HD video.

[crarko adds: I haven't tested this one.]
    •    
  • Currently 1.89 / 5
  You rated: 3 / 5 (9 votes cast)
 
[12,435 views]  

Maximize browser performance with a RAMdisk | 10 comments | Create New Account
Click here to return to the 'Maximize browser performance with a RAMdisk' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This is not a good idea
Authored by: lincd0 on Mar 18, '11 09:10:36AM

The Mac OS automatically caches recently used data in memory if enough RAM is installed, so using a RAM disk won't improve performance. If you don't have enough RAM, reserving some of it for a RAM disk is the wrong thing to do. The right thing to do is to install more RAM.



[ Reply to This | # ]
This is not a good idea
Authored by: DaijDjan on Mar 19, '11 08:10:16PM

if an app writes to disk, it writes to disk... maybe the os bundles writes but from my 'tests' using cocoa & dtrace & fseventer, it doesnt 'discard a write ;)

this hint results in having to store the ramdisk once only -- even if there were 1000 individual writes for real



[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: Anonymous on Mar 18, '11 02:28:53PM

"On SSD-only systems, reducing disk writes is key".

And what makes you think the firmware isn't doing all it can to reduce those writes?

Really, hints like this make me cringe. No benchmarks, no metrics at all, just a bunch of unaffirmed assertions; and a whole load of people digging into their systems exposing their data to potential loss or corruption each time it's moved between storage and memory.



[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: bugmenot1 on Mar 19, '11 02:07:05PM
And what makes you think the firmware isn't doing all it can to reduce those writes?
the fact that all versions of OSX up to now(and possibly even Lion) do not support TRIM command required for SSD drives to utilize their wear-leveling algorithms. When you delete a file in OSX(actually somewhat similar to Windows), that file isn't actually completely zero'd out on it, but rather just marked as deleted in the master file system database. So to SSD that file are still legitimately utilized blocks that must not be touched or moved. Read http://en.wikipedia.org/wiki/TRIM for detailed explanation.

[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: BigBadbenny on Mar 18, '11 08:33:08PM

Thanks for the comments, my tip was intended to build on, and in a more simplified way, tips previosly submitted on Mac OS X Hints. I'm a beginner at such things, so constructive criticism is very welcome.
As for testing, metrics etc, I'm very willing if you have any suggestions, cheers, Ben.



[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: theosib on Mar 19, '11 07:19:23AM

I'm not sure what the CCC schedule is to commit cache data to real disk, but there can be advantages to using a RAM disk. This basically comes in the form of no pressure to commit changes to disk. If you run out of free RAM, then it'll hit swap, which would defeat the purpose. Otherwise, you never have any overhead from writing to physical media.



[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: DaijDjan on Mar 19, '11 08:12:39PM

<blockquote>no pressure to commit changes to disk</blockquote>
that's what I meant in my reply above :D



[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: bugmenot1 on Mar 19, '11 02:24:47PM
A script to delete the FF cache on exit would be a great addition to this tip. It's possible that another cloning app may have an option to exclude files that I've overlooked.
This is a really bad tip!
The whole point of browser cache is to speed up your experience for extended periods of time, including between browser restart sessions! Getting data over the internet is still much slower than even the slowest spinning disks and I'm not even talking about SSDs.
By constantly emptying your disk cache you are slowing down your browsing, making the experience worse, and actually costing more money to the websites you visit by forcing them to constantly resend easily cache-able data. Not only that, you are also negatively affecting other visitor's experience because you are needlessly using up website's bandwidth that could be used to service more users.

Let's take this website for example, it has identical header and footer images on every page. These page elements be easily cached "forever" because they never change (other than the site design changes). Why would you waste your own time downloading those parts of the page on every visit? Why not save them on your disk cache and instantly load them from it whenever your browser needs them?!

Why do you think browser developers and HTML standard advisers are also pushing for new ways to cache data such as HTML5 application storage? It's about speeding up YOUR web experience. By constantly deleting your disk cache you are undoing all their work and research.

Please folks, don't listen to that tip. As a matter of fact, increase your disk cache size, you will only benefit from that!

[ Reply to This | # ]
Maximize browser performance with a RAMdisk
Authored by: BigBadbenny on Mar 23, '11 05:42:23PM

Intriguing , but we do still have the option to keep the cache on the self restoring RAMDisk.
There are arguments for keeping and deleteing the cache between sessions - is one more 'right' than the other?



[ Reply to This | # ]
re: CCC schedule
Authored by: BigBadbenny on Mar 19, '11 10:38:37PM

I'd prefer to be using Firefox as above, but sandboxed. I there a simple way to do that?
On reflection, the CCC schedule might be better applied *not* backing up to the Esperance restore image, but to a separate backup, just for redundancy.
I'm also trying out this tip which loads the cache directly to RAM.
lifehacker.com.au/2010/11/speed-up-firefox-by-moving-your-cache-to-ram



[ Reply to This | # ]