Skip to content

Unstable Memory Usage / Huge Memory Spikes (Dozens of GBs) under Request Load - Is it related to Memory Allocator Fragmentation? #150

@553589912

Description

@553589912

Issue Description:
Hi team,
I am running a Hyperliquid node and noticed an issue regarding unstable memory consumption.

Symptom: When the node is idling, memory usage is relatively stable. However, once it starts receiving request traffic (e.g., RPC/Gossip queries), the memory usage spikes drastically—sometimes increasing by dozens of Gigabytes within just a few hours.

Observation: This extra memory doesn't seem to be released back to the OS even after the request volume drops.

Questions:

Is this memory behavior expected under heavy query load, or is it a known memory leak/fragmentation issue?

Does the current node implementation heavily rely on the default system allocator (like glibc ptmalloc)?

Would switching to alternative allocators like jemalloc or mimalloc help mitigate this fragmentation? If so, are there any recommended environment variables or build flags (e.g., MALLOC_CONF for jemalloc) we should configure?

Looking forward to your insights. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions