>From the codebase as much I understood, if once a buffer is being allocated, then it is not freed and added to a recyclable pool. When a new request comes effort is made to fetch memory from recyclable pool and if is not available new allocation request is made. And while allocating a new request if memory limit is breached then we get this oom error.
I would like to know is my understanding correct If what I am thinking is correct, is there way we can get this buffer pool reduced when there is low traffic because what I have observed in my system this memory remains static even if there is no traffic. Regards Manish On Sat, Apr 18, 2020 at 11:13 AM Erick Ramirez <[email protected]> wrote: > Like most things, it depends on (a) what you're allowing and (b) how much > your nodes require. MaxDirectMemorySize is the upper-bound for off-heap > memory used for the direct byte buffer. C* uses it for Netty so if your > nodes are busy servicing requests, they'd have more IO threads consuming > memory. > > During low traffic periods, there's less memory allocated to service > requests and they eventually get freed up by GC tasks. But if traffic > volumes are high, memory doesn't get freed up quick enough so the max is > reached. When this happens, you'll see OOMs like "OutOfMemoryError: > Direct buffer memory" show up in the logs. > > You can play around with different values but make sure you test it > exhaustively before trying it out in production. Cheers! > > GOT QUESTIONS? Apache Cassandra experts from the community and DataStax > have answers! Share your expertise on https://community.datastax.com/. > >>
