From: Linus Torvalds Date: Mon, 19 Mar 2007 16:10:39 GMT Subject: Re: [PATCH] Limit the size of the new delta_base_cache Message-ID: In-Reply-To: <20070319051437.GA22494@spearce.org> On Mon, 19 Mar 2007, Shawn O. Pearce wrote: > > Round two, based on comments on IRC from Junio: One more change: please don't even *add* objects to the cache that are bigger than 10-20% of the cache limit! If you start adding big objects, and you have some cache limit, that will make the cache seriously less useful by causing eviction of potentially much more interesting objects, and also obviously causing the cache code itself to spend much more time picking objects (since it's enough to have just a few big objects to make the cache eviction decide it needs to evict). Limiting by size is also effective since anything that is more than a megabyte is likely to be a blob anyway, and thus much less useful for caching in the first place. So there are just tons of reasons to say "don't even add it in the first place" if you decide to go with any limit at all. Linus