[ 
https://issues.apache.org/jira/browse/CASSANDRA-19022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852262#comment-17852262
 ] 

Brad Schoening commented on CASSANDRA-19022:
--------------------------------------------

This may be a quirk of Netty when maxDirectMemory() isn't set it doesn't count 
it?
{code:java}
public static long usedDirectMemory()

Returns the current memory reserved for direct buffer allocation. This method 
returns -1 in case that a value is not available.
{code}
[io.netty.util.internal.PlatformDependent|https://netty.io/4.1/api/io/netty/util/internal/PlatformDependent.html]

See also [Netty issue #11895|https://github.com/netty/netty/issues/11895]

{{Other articles suggest PooledByteBufAllocator.metric()}} and 
{{UnpooledByteBufAllocator.metric() may have the actual numbers.}}

> Nodetool gcstats correctly displays Direct Memory usage and supports printing 
> in table format
> ---------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-19022
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19022
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/nodetool
>            Reporter: Brad Schoening
>            Assignee: Ling Mao
>            Priority: Normal
>             Fix For: 5.x
>
>
> If {{io.netty.maxDirectMemory}} is not specified, Netty defaults the limit to 
> the max heap size.  Thus, direct memory in use can be significant.
> However, trying this on two different platform and the result returned in 
> gcstats is always -1:
> {noformat}
> Interval (ms) Max GC Elapsed (ms)Total GC Elapsed (ms)Stdev GC Elapsed (ms)   
> GC Reclaimed (MB)         Collections      Direct Memory Bytes
> 2792770717                 274              665186                  54      
> 41276288089024                6120                       -1{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to