hiero-ledger / hiero-ledger/hiero-consensus-node
Reduce `-XX:MaxDirectMemorySize` after `LongListSegment` migration
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
### Context
`LongListSegment` replaces `LongListOffHeap` (see https://github.com/hiero-ledger/hiero-consensus-node/pull/24695) as the default off-heap index implementation. Unlike `LongListOffHeap`, which allocates NIO direct buffers (tracked by the JVM and capped by `MaxDirectMemorySize`), `LongListSegment` allocates native memory via the FFM `Arena` API, which bypasses `MaxDirectMemorySize` entirely.
The LongList indices were the dominant consumer of direct memory. With the migration, the current `MaxDirectMemorySize` values (8g–32g) no longer reflect actual direct memory usage and may cause confusion.
### Change
Reduce `MaxDirectMemorySize` to `1g` across all configuration files and startup scripts. This provides sufficient headroom for remaining direct memory consumers (primarily Netty, plus minor direct memory usage elsewhere) without overstating the allocation budget.
### Files to update
Search for `MaxDirectMemorySize` across the repository and update all occurrences.
Contributor guide
Assessment
This issue has not been assessed yet.