lhotari commented on issue #25433:
URL: https://github.com/apache/pulsar/issues/25433#issuecomment-4160629453

   > ## Reducing Netty direct memory usage
   > 
   > If restarts are related to OOMKilled, reducing Netty's direct memory 
allocation can help. Setting `-Dio.netty.allocator.maxOrder` controls the chunk 
size Netty pre-allocates for direct buffers.
   > 
   > Add it via `PULSAR_EXTRA_OPTS` in your `values.yaml` if using 
pulsar-helm-chart:
   > ```yaml
   > bookkeeper:
   >   configData:
   >     PULSAR_EXTRA_OPTS: >-
   >       -Dpulsar.allocator.exit_on_oom=true
   >       -Dio.netty.recycler.maxCapacityPerThread=4096
   >       -Dio.netty.allocator.maxOrder=10
   > ```
   > 
   > - `io.netty.allocator.maxOrder=10` — sets the PooledByteBufAllocator chunk 
size to 8 MB. The default order is 9 (4 MB chunks). Increasing to 10 allows 
larger contiguous allocations, which can reduce fragmentation for bookie 
workloads with heavy direct memory usage.
   > - `pulsar.allocator.exit_on_oom=true` — forces the process to exit on 
allocation failure instead of entering an unstable state.
   > - `io.netty.recycler.maxCapacityPerThread=4096` — caps the per-thread 
object recycler pool size.
   (related to https://github.com/apache/pulsar/pull/25274, change is only made 
to 4.2.x)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to