Skip to content

Commit

Permalink
Document RMW_ZENOH_BUFFER_POOL_MAX_SIZE_BYTES
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Jan 3, 2025
1 parent 8ba5278 commit e7f140c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,16 @@ Thus, there is no direct implementation of actions in `rmw_zenoh_cpp`.
## Security

TBD

## Environment variables

### `RMW_ZENOH_BUFFER_POOL_MAX_SIZE_BYTES`

The RMW recycles serialization buffers on transmission using a buffer pool with bounded memory
usage. These buffers are returned to the pool — without being deallocated — once they cross the
network boundary during host-to-host communication, or upon being consumed by subscriptions in
intra-process communication, etc. When the total size of the allocated buffers within the pool
exceeds `RMW_ZENOH_BUFFER_POOL_MAX_SIZE_BYTES`, then the serialization buffer is allocated using the
system allocator and moved to Zenoh; no recyling is performed in this case to prevent the buffer
pool from growing uncontrollably. The default value of `RMW_ZENOH_BUFFER_POOL_MAX_SIZE_BYTES` is 16
MiB, thus roughly proportionate to the cache size of a typical modern CPU.

0 comments on commit e7f140c

Please sign in to comment.