Stream Processing Fundamentals
How to Limit Memory Usage in ksqlDB

How to Limit Memory Usage in ksqlDB

10/22/2020 · Rohan Desai

What this post added

This post details how ksqlDB manages and limits memory usage, particularly focusing on off-heap allocations by RocksDB. It explains the configuration of RocksDB with a shared cache, shared write buffer manager, and index/bloom filter caching to bound memory. The post investigates a real-world scenario where memory usage grew unbounded due to glibc's malloc implementation retaining memory in arenas after query termination and restart, leading to memory leaks. The solution involved using alternative allocators like jemalloc or TCMalloc, or in Confluent Cloud, implementing a fix to ensure proper memory release.

Read the original post ↗