git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Limit the size of the new delta_base_cache

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 19, 2007, 16:10 UTC
Message-ID
<Pine.LNX.4.64.0703190906320.6730@woody.linux-foundation.org>
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
Previous: Shawn O. PearceNext: Nicolas Pitre
Message 2 of 8 in “Limit the size of the new delta_base_cache”
  1. Limit the size of the new delta_base_cacheShawn O. Pearce, Mar 19, 2007
  2. Linus TorvaldsMar 19, 2007
  3. Nicolas PitreMar 19, 2007
  4. Nicolas PitreMar 19, 2007
  5. Linus TorvaldsMar 19, 2007
  6. Linus TorvaldsMar 19, 2007
  7. Linus TorvaldsMar 19, 2007
  8. Nicolas PitreMar 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.