]> source.dussan.org Git - jgit.git/commit
DHT: Change DhtReadher caches to be dynamic by workload 08/3708/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 10 Jun 2011 02:10:11 +0000 (19:10 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 10 Jun 2011 02:10:15 +0000 (19:10 -0700)
commitd34ec1201950c01f9b6a104540b31dbd614eea65
tree41a350dab964ce229106c6f69f925b65719161ef
parent1e6b02643c7052a385dba041ffa7c7fd8b8a3ac8
DHT: Change DhtReadher caches to be dynamic by workload

Instead of fixing the prefetch queue and recent chunk queue as
different sizes, allow these to share the same limit but be scaled
based on the work being performed.

During walks about 20% of the space will be given to the prefetcher,
and the other 80% will be used by the recent chunks cache. This
should improve cases where there is bad locality between chunks.

During writing of a pack stream, 90-100% of the space should be
made available to the prefetcher, as the prefetch plan is usually
very accurate about the order chunks will be needed in.

Change-Id: I1ca7acb4518e66eb9d4138fb753df38e7254704d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/DhtCachedPack.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/DhtReader.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/DhtReaderOptions.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/OpenQueue.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/Prefetcher.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/RecentChunks.java