178
the application will need. If the slab allocator depletes a certain bucket size, it allocates
from larger sized buckets, which reduces the amount of free space. These mechanisms
can potentially block the application’s processing and reduce its performance.
libvmemcache Overview
libvmemcache is an embeddable and lightweight in-memory caching solution with a
key-value store at its core. It is designed to take full advantage of large-capacity memory,
such as persistent memory, efficiently using memory mapping in a scalable way. It
is optimized for use with memory-addressable persistent storage through a DAXenabled file system that supports load/store operations. libvmemcache has these unique
characteristics:
• The extent-based memory allocator sidesteps the fragmentation
problem that affects most in-memory databases, and it allows the
cache to achieve very high space utilization for most workloads.
• Buffered LRU (least recently used) combines a traditional LRU
doubly linked list with a non-blocking ring buffer to deliver high
scalability on modern multicore CPUs.
• A unique indexing critnib data structure delivers high performance
and is very space efficient.
The cache for libvmemcache is tuned to work optimally with relatively large value
sizes. While the smallest possible size is 256 bytes, libvmemcache performs best if the
expected value sizes are above 1 kilobyte.
libvmemcache has more control over the allocation because it implements a custom
memory-allocation scheme using an extents-based approach (like that of file system
extents). libvmemcache can, therefore, concatenate and achieve substantial space
efficiency. Additionally, because it is a cache, it can evict data to allocate new entries in
a worst-case scenario. libvmemcache will always allocate exactly as much memory as it
freed, minus metadata overhead. This is not true for caches based on common memory
allocators such as memkind. libvmemcache is designed to work with terabyte-sized
in-memory workloads, with very high space utilization.
Chapter 10 Volatile Use of persistent MeMory
the application will need. If the slab allocator depletes a certain bucket size, it allocates
from larger sized buckets, which reduces the amount of free space. These mechanisms
can potentially block the application’s processing and reduce its performance.
libvmemcache Overview
libvmemcache is an embeddable and lightweight in-memory caching solution with a
key-value store at its core. It is designed to take full advantage of large-capacity memory,
such as persistent memory, efficiently using memory mapping in a scalable way. It
is optimized for use with memory-addressable persistent storage through a DAXenabled file system that supports load/store operations. libvmemcache has these unique
characteristics:
• The extent-based memory allocator sidesteps the fragmentation
problem that affects most in-memory databases, and it allows the
cache to achieve very high space utilization for most workloads.
• Buffered LRU (least recently used) combines a traditional LRU
doubly linked list with a non-blocking ring buffer to deliver high
scalability on modern multicore CPUs.
• A unique indexing critnib data structure delivers high performance
and is very space efficient.
The cache for libvmemcache is tuned to work optimally with relatively large value
sizes. While the smallest possible size is 256 bytes, libvmemcache performs best if the
expected value sizes are above 1 kilobyte.
libvmemcache has more control over the allocation because it implements a custom
memory-allocation scheme using an extents-based approach (like that of file system
extents). libvmemcache can, therefore, concatenate and achieve substantial space
efficiency. Additionally, because it is a cache, it can evict data to allocate new entries in
a worst-case scenario. libvmemcache will always allocate exactly as much memory as it
freed, minus metadata overhead. This is not true for caches based on common memory
allocators such as memkind. libvmemcache is designed to work with terabyte-sized
in-memory workloads, with very high space utilization.
Chapter 10 Volatile Use of persistent MeMory
