-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically size the read buffer based on contention
Previously the read buffer consisted of a fixed number of segments, each consisting of a bounded ring buffer. This provided performance under heavy load, at the cost of high memory when the cache was created. For caches that are not heavily contended this is wasteful, especially when many are constructed. This fixed cost is replaced with a dynamic approach, which starts at a single buffer and expands as needed. The upper limit results in the same number of read buffers, but only under high load. This dramatically reduces memory usage. The approach is based on j.u.c.Striped64, which provides the mechanism for Java's high performance 64-bit atomic counters.
- Loading branch information
Showing
20 changed files
with
623 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.