hiero-ledger / hiero-ledger/hiero-consensus-node

Reduce `-XX:MaxDirectMemorySize` after `LongListSegment` migration

Open
#24,743 0 comments 0 reactions 1 assignee Claimed by @imalygin View on GitHub
Platform
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.