login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Shawn O. Pearce <spearce@...>, Junio C Hamano <junkio@...>, <git@...>
Date: Monday, March 19, 2007 - 12:41 pm

On Mon, 19 Mar 2007, Linus Torvalds wrote:


On the other hand......

Either you parse blobs or you don't.  If you only do logs with path 
limiting then you won't add blobs to the cache anyway.

If you do end up adding blobs to the cache that means you have blob 
deltas to resolve, and even that operation should benefit from the cache 
regardless of the object size.

In fact, the bigger is the object, the more effective will be the cache.  
Because you certainly don't want to have a complete breakdown in 
performance just because a blob just crossed the 20% treshold.

And because we usually walk objects from newest to oldest, and because 
deltas are usually oriented in the same direction, we only need to tweak 
the current eviction loop a bit so on average the oldest objects are 
evicted first so next time around the current base will still be there 
for the next delta depth.  Given the nature of the hash containing the 
object's offset that means starting the loop at the next entry index 
instead of zero which should do the trick pretty well.

Of course if you end up in a condition where you have to prune the cache 
continuously, you'll spend more cycles picking up the object to evict, 
but it is likely to be so much less work than reintering that O(n!) 
behavior with deflate we had without the cache, and even worse since we 
mean big objects in this case.

So I wouldn't add any rule of that sort unless it is actually proven to 
be bad.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Limit the size of the new delta_base_cache, Shawn O. Pearce, (Mon Mar 19, 1:14 am)
Re: [PATCH] Limit the size of the new delta_base_cache, Linus Torvalds, (Mon Mar 19, 12:10 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Nicolas Pitre, (Mon Mar 19, 12:41 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Linus Torvalds, (Mon Mar 19, 1:07 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Linus Torvalds, (Mon Mar 19, 1:17 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Nicolas Pitre, (Mon Mar 19, 2:08 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Nicolas Pitre, (Mon Mar 19, 12:54 pm)
Re: [PATCH] Limit the size of the new delta_base_cache, Linus Torvalds, (Mon Mar 19, 1:18 pm)
speck-geostationary