]> source.dussan.org Git - jgit.git/commit
DHT: Remove per-process ChunkCache 41/3341/4
authorShawn O. Pearce <spearce@spearce.org>
Thu, 5 May 2011 18:18:54 +0000 (11:18 -0700)
committerChris Aniszczyk <caniszczyk@gmail.com>
Wed, 25 May 2011 13:50:30 +0000 (08:50 -0500)
commit7cad0adc7dd0f1ce261a11b16bd1725a12827161
treeb32517a616c5e99987d96c21f8e15a2b87c9d33e
parentaa05559fd6a9099f90c8beeb80364e440e2614a2
DHT: Remove per-process ChunkCache

Performance testing has indicated the per-process ChunkCache isn't
very effective for the DHT storage implementation.  If a server is
using the DHT storage backend, it is most likely part of a larger
cluster where requests are distributed in a round-robin fashion
between the member servers.

In such a scenario there is insufficient data locality between
requests to get a good hit ratio on the per-process ChunkCache.  A low
hit ratio means the cache is actually hurting performance by eating up
memory that could otherwise be used for transient request data, and
increasing pressure on the GC when it needs to find free space.

Remove all of the ChunkCache code.  Installations that want to cache
(to reduce database usage) should wrap their Database with a
CacheDatabase and use a network based CacheServer.

I left the ChunkCache in the original DHT storage commit because I
wanted to document in the history of the project that its probably
worth *not* having, but leave open a door for someone to revert this
change if they find otherwise at a later date.

Change-Id: I364d0725c46c5a19f7443642a40c89ba4d3fdd29
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/ChunkCache.java [deleted file]
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/ChunkCacheConfig.java [deleted file]
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/OpenQueue.java
org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/Prefetcher.java