A Java library for creating in-memory circular buffers using direct ByteBuffers to minimize garbage collection overhead.
Low-GC-Membuffers is a Java library that provides in-memory circular buffers using direct ByteBuffers to minimize garbage collection overhead. It solves the problem of high GC pauses in performance-sensitive applications by storing data off-heap, offering efficient FIFO queues for primitive value sequences like bytes and longs.
Java developers building high-performance, low-latency systems such as big data frameworks, metrics collection tools, web servers, or event queues where GC overhead is a concern.
Developers choose this library for its proven stability in production, minimal GC impact due to off-heap storage, and flexible buffer types (chunky/streamy) that cater to different data handling needs without sacrificing thread safety.
Library for creating In-memory circular buffers that use direct ByteBuffers to minimize GC overhead
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Stores data in direct ByteBuffers outside the Java heap, significantly reducing garbage collection overhead, as emphasized in the project's core philosophy for performance-critical systems.
All buffer accesses are synchronized, enabling safe use by multiple producer and consumer threads, which is explicitly stated in the README's thread-safety section.
Used in production since 2012 by companies like Salesforce, with a stable 1.0 release in 2013, indicating reliability for high-throughput applications.
Supports both chunky (discrete entries) and streamy (coalesced entries) buffers for bytes and longs, allowing optimization for different data patterns, as detailed in the buffer variations.
Enables buffer groups to share underlying segment allocators, facilitating memory reuse and strict bounds, which is highlighted in the 'Fancier stuff: multiple buffers' section.
Buffers must be explicitly closed to avoid memory leaks, as the README warns, adding complexity and risk compared to auto-closing constructs in Java.
Requires tuning segment sizes, counts, and JVM settings like -XX:MaxDirectMemorySize, which the README admits can lead to OutOfMemoryError if mismanaged.
Only implements byte and long buffers natively; while extensible, adding other types like int or char requires additional development effort, as noted in the overview.
Lacks integrated support for object serialization, forcing users to manually convert complex data to primitive sequences, which adds boilerplate code.