Use less than default 1GB Spotify cache, save disk space (SSD)

September 22nd, 2010 by Mark Nanut Leave a reply »

Ok, this is another post related to saving more disk space, particularly in the context of using a small SSD drive. My Kingston SSDNow SNM225-S2 (Intel X-25M) SSD’s capacity is only 80 GB and there is a constant need to have less clutter and pack more useful stuff into it. In my previous post I explained how to snatch back disk space from the jaws of Gmail, and I’ve been since monitoring who are big “squatters” on my disk. It turned out that the client for the popular music service Spotify can actually use more space than it really should.

If you’re using Spotify, then you probably already know that you can set the size of the cache anywhere between 1GB and 4GB, or even set it to automatic handling.

spotify-cache

Naturally I have set the cache all the way from 4GB down to 1GB. But thinking about it, I really don’t need as much cache as 1GB – that’s still quite a lot of music (at non-premium bitrate) taking up disk space. I figured out that it is actually possible for Spotify to use less than 1GB cache – I have set mine to 384 Mb, which should be perfectly adequate for my listening habits.

First quit Spotify if it’s open. Then go to ~/Library/Application Support/Spotify/

Edit the file “settings” with a plaintext editor – change the “cache_size” value to the wanted size in megabytes.

spotify-settings-file

Save the file, start Spotify. Even though the preferences in Spotify will show as if you are still using the minimum “allowed” cache (1GB), you’ll be using less than that – if you watch Finder, you’ll see you have freed extra disk space.

Enjoy!

Related posts on this site

Advertisement
  • Nima

    would spotify work with disabled cache. I have SSD drive and would like to disable cache, or my next option will be get RAMDISK and store it there. Not for the reason of space but because the more unnecessary read/write to SSd disk, the worse for the disk

  • http://www.google.com/profiles/marknanut Mark Nanut

    Not sure how completely disabling the cache would work. You would have to apply some sort of restriction to write anything into cache directory. “cache_size”:0 does not work, for instance.

    I wouldn't worry about wearing SSD down anytime soon, though. After all, it is supposed to be USED and by the time you (if at all) wear it down, you'll be able to get a new and better one at dirt cheap price. If you have enough SSD space, then in your case I wouldn't limit the cache too much – supposedly a larger cache would prevent the same place (if that is the case at all) being written over too often – I'm just speculating. Have a look also how to enable TRIM support in OSX. 

    Then again, you could take the time and move some or all caches to another location if wearing down the SSD concerns you that much – to another hard drive, ramdisk, expresscard…if you have enough RAM (at least 4GB) I'd try, as you suggested, ramdisk and a very small cache for Spotify in this case. 

    Thanks for tuning in,
    Cheers
    Mark

  • Nima

    Hi

    thx for the answer! For sure you are right baout the SSD was meant to be used of course. However I am using it a lot in my work (although its not kind of work where company pays cus then i wouldnt care ). But I just have some kind of perfection feeling about my new bought system.
    I did decide to get a ramdisk and put caches and temps there. For various programs like internet browsers, windows and now spotify. i think that can be a good result to just limit the cache to around 300MB and just put it on the ramdrive.

    cheers

  • Nima

    Also to clearify for users that cant find the settings file (was kinda hard to find) in windows7.
    you can find it in:
    C:Users_YourUserName_AppDataRoamingSpotify
    I put mine to 512MB cus I have high quality streaming.. we'll see how it goes. I'll post back if errors

  • Nima

    damn it.. doesnt seem to work.
    Location works but I set cache to like 112MB and it still goes over this limit..
    Any idea why ?

  • http://www.google.com/profiles/marknanut Mark Nanut

    Did you adjust Spotify in-app settings to “use at most X GB” of cache instead of automatic?

  • Nima

    Yes I did but it seems now that its forcing the cachesize very loosely. it seems to walk a bit over the ammount i set but then shrink itself later. Its working fine now actually.

  • Hhh

    I used the in-app slider to set it to 1GB, then changed the value in the settings file to 32.  So far, this seems to have disabled the cache completely, as I am not seeing the storage files appear at all.  This is good, since my virus checker was taking forever to scan my system with all those cache files out there.

  • http://www.forthillhistory.tumblr.com Jason Turgeon

    Thanks for that tip, I couldn't find it anywhere.  I run a small partition for my OS and didn't want Spotify eating up a full gig – got it down to 256 MB.  And thanks to Mark for the original post!

Web Analytics