Search yellowchilli's blog

Loading...

30 January, 2011

Relocating Chrome's cache to a SSD in OSX

There's no denying that all Mac Minis run sluggishly due to its low-midrange processor and slow hard disk. I happen to own the 2010 model but it's no different. So I thought I'd attempt to offload some IO from the drive as well as speed up my web browsing by relocating Google Chrome and its cache to a SSD drive.
















Relocating the application itself is simple enough as most mac users know that there's nothing complicated like registries in Windows. So all that is required it dragging and then dropping "Chrome.app" (yes i renamed it) to the desired drive- in my case the SSD.
Now starting Chrome feels faster. Problem is, its cache location is still on the internal drive, somewhere around ~/Library/Cache/.
Now this is where it things would have been easier in Windows. Create a shortcut, add --disk-cache-dir as its switch and voila. A saved icon that'll work every time.
Under OSX however, the only solution I have tested that is working, is a Terminal command. Couldn't save it as an executable script...couldn't get Automator to work... Just Terminal.
and here it is:


open /Volumes/SSDOSX/Chrome.app --args -user-data-dir="/Volumes/SSDOSX/ChromeCache/" &

Just change the paths. I renamed "Google Chrome.app" to "Chrome.app" so that the command would accept it.
yes it ends with an Ampersand. And yes I have to open Terminal and type or copy and paste all that every time I need to run Chrome the way I like.
If anyone knows better, then please do let me know.


4 comments:

  1. This tip also looks useful
    www.chromium.org/user-experience/user-data-directory
    Scroll to "Running from a Custom Location".
    P.S. what 8GB SSD are you using?

    ReplyDelete
  2. Try symlinking:
    www.frederico-araujo.com/2008/12/18/blazing-fast-firefox-using-osx-ramdisk
    I used the symlinking instructions to move to a my FF4 profile to a RAMdisk. To get that to work properly I had to change "&&" to "&&" and cd the folder containing my profile, and of course change the relevant paths appropriately.
    I'm about to use the same tip to relocate Chrome's cache and profile.

    # cd the folder containing profile

    # move the current profiles folder
    mv Profiles Profiles_ &&

    # make a symlink to the ramdisk
    ln -s /Volumes/RAMDisk ./Profiles &&

    # then copy it to the ramdisk
    /bin/cp -r Profiles_/* Profiles

    Obviously you'd substitute RAMdisk for your SSD...
    Indeed you may want to experiment with moving the app, cache and profiles to a RAMdisk. I use Esperance DV to create a a 1GB RAMDisk that auto restores on boot.

    ReplyDelete
  3. o it's a pata ssd that i pulled out of my dell mini 9

    ReplyDelete