[ccache] Compression on or off by default?

Dalton, Tom tdalton at hp.com
Wed Mar 3 03:39:47 MST 2010

I would say for the first release of a new feature, default it to off. That gives people a chance to 'play' with it without potentially breaking existing installations that are simply upgrading. If there are no major problems with the feature in that first release then make it a default in the next release after that (e.g. ccache-3.1).

-----Original Message-----
From: ccache-bounces at lists.samba.org [mailto:ccache-bounces at lists.samba.org] On Behalf Of Joel Rosdahl
Sent: 02 March 2010 22:11
To: ccache at lists.samba.org
Subject: [ccache] Compression on or off by default?


Lars Gustäbel's compression patch (which will be incorporated in ccache 3.0) enables compression by default, and if you don't want compression you have to set CCACHE_NOCOMPRESS. I'm still a bit undecided about whether defaulting to compression is a good idea, though. Maybe we should be more conservative here and require CCACHE_COMPRESS to be set to enable compression instead? (Note that the question only is about the default behaviour when storing files in the cache -- ccache will still be able to read compressed and uncompressed files from the cache regardless of the CCACHE_(NO)COMPRESS setting.)

The main argument I see for making compression opt-in is that hard-linking doesn't work for compressed files (where "doesn't work" means that ccache will fall back to copying), so if you would like to try out hard-linking, you must set both CCACHE_NOCOMPRESS and CCACHE_HARDLINK, and also build up the cache again. Or, if you currently have enabled hard-linking with ccache 2.4, you need to take the explicit action of disabling compression after an upgrade to get the previous behaviour.

Another argument is maybe that disk space is cheap nowadays, and most people probably want to optimize for speed instead of disk space. On the other hand, the overhead of using compression is very small. In fact, I am unable to consistently measure any performance impact whatsoever. (Lars Gustäbel's own measurements can be found at <http://gustaebel.de/lars/ccache/>.) And, by compressing the cached files, more files will fit in the cache and also in the OS disk cache.

Does anyone have an opinion to share about this?

-- Joel
ccache mailing list
ccache at lists.samba.org

More information about the ccache mailing list