Skip to content

Benchmarks

Ben Manes edited this page May 14, 2015 · 30 revisions

The benchmarks use Java microbenchmark harness to provide an accurate analysis. Run on a MacBook Pro i7-4870HQ CPU @ 2.50GHz (4 core) 16 GB Yosemite.

Guava was configured with a concurrency level of 64 (defaults to 4 to reduces memory usage). Infinispan "old" is a Guava-like cache that buffers the eviction policy and "new" is a rewrite using a lock-free deque.

Compute

In this benchmark the caches are unbounded, fully populated, and the computation returns a constant value. This benchmark demonstrates the overhead due to locking when the entry is present. Caffeine performs a lock-free prescreening before falling back to an atomic compute if absent call. The scenarios graphed are all threads retrieving a single entry ("sameKey") and threads retrieving different keys based on a Zipf distribution ("spread").

Read (100%)

In this benchmark 8 threads concurrently read from a cache configured with a maximum size.

Write (100%)

In this benchmark 8 threads concurrently write to a cache configured with a maximum size.

Read (75%) / Write (25%)

In this benchmark 6 threads concurrently read from and 2 threads write to a cache configured with a maximum size.

Clone this wiki locally