[
https://issues.apache.org/jira/browse/CASSANDRA-21556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130633#comment-18130633
]
Yuqi Yan edited comment on CASSANDRA-21556 at 10/28/26, 12:32 AM:
------------------------------------------------------------------
+1(nb) on this - Netty direct memory has separate counter and currently it's
not exposed to C* metric - we saw OOM from C* container but we had to chase the
log then knows it was due to this Netty direct memory limit set by default to
be equal to -Xmx.
I skim through the change and don't see major concern (though I'm not committer
but just wanted to say this patch is helpful and we should have this)
was (Author: JIRAUSER301388):
+1 on this - Netty direct memory has separate counter and currently it's not
exposed to C* metric - we saw OOM from C* container but we had to chase the log
then knows it was due to this Netty direct memory limit set by default to be
equal to -Xmx.
I skim through the change and don't see major concern (though I'm not committer
but just wanted to say this patch is helpful and we should have this)
> Add metrics about Netty memory usage
> ------------------------------------
>
> Key: CASSANDRA-21556
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21556
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Observability/Metrics
> Reporter: Ling Mao
> Assignee: Ling Mao
> Priority: Normal
> Fix For: 7.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When Netty Direct Memory leaks occur, they can be extremely difficult to
> diagnose and may cause serious production issues. Add metrics to monitor
> Netty memory usage for observability, debugging, and alerting.
> The comments in `NettyMemoryMetrics` provide a summary of what contributes to
> Netty Direct Memory and Java Direct Memory usage.
> Do not use Netty`allocator.metric()` apis for these metrics. The memory
> usage from individual allocators is relatively small and distributed across
> different components. Additionally, querying allocator metrics is not as
> lightweight as using `PlatformDependent::usedDirectMemory`.
> The metrics location:
> {code:java}
> org.apache.cassandra.metrics:type=NettyMemory,name=UsedDirectMemory
> org.apache.cassandra.metrics:type=NettyMemory,name=DirectMemoryLimit
> # promethus metrics
> # HELP cassandra_nettymemory_directmemorylimit Attribute exposed for
> management
> org.apache.cassandra.metrics:name=DirectMemoryLimit,type=NettyMemory,attribute=Value
> # TYPE cassandra_nettymemory_directmemorylimit gauge
> cassandra_nettymemory_directmemorylimit 4.294967296E9
> # HELP cassandra_nettymemory_useddirectmemory Attribute exposed for
> management
> org.apache.cassandra.metrics:name=UsedDirectMemory,type=NettyMemory,attribute=Value
> # TYPE cassandra_nettymemory_useddirectmemory gauge
> cassandra_nettymemory_useddirectmemory 1.6777216E7
> {code}
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]