-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lettuce now uses BitSet to represent internally cluster slots assigned to a cluster node. The slot storage is allocated lazily and nodes without a slot (non-slot masters, slave nodes) won't allocate any memory for the slot storage. This change reduces the memory usage from the previously used ArrayList with initially 16 elements backed by an Object[]. A node with all slots assigned required about 325.000 bytes of memory. Using a BitSet stores only bitwise whether a slot is assigned or not. The storage requires a fixed amount of memory (about 2184 bytes) for each node independent of how many slots are occupied. A cluster of 150 nodes reached the break-even between the previous and current pattern if at least a single slot is used on a particular node. Clusters with more nodes will have always a higher memory consumption if at least a single slot is occupied.
- Loading branch information
Showing
7 changed files
with
274 additions
and
97 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
Oops, something went wrong.