[
https://issues.apache.org/jira/browse/HDFS-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777438#action_12777438
]
dhruba borthakur commented on HDFS-94:
--------------------------------------
Currently, the code uses
{quote}
long totalMemory = Runtime.getRuntime().totalMemory();
long maxMemory = Runtime.getRuntime().maxMemory();
long used = (totalMemory * 100)/maxMemory;
{quote}
Is it better to use :
{quote}
MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
MemoryUsage status = memoryMXBean.getHeapMemoryUsage();
usedMemory = status.getUsed();
maxMemory = status.getMax();
{quote}
> The "Heap Size" in HDFS web ui may not be accurate
> --------------------------------------------------
>
> Key: HDFS-94
> URL: https://issues.apache.org/jira/browse/HDFS-94
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Tsz Wo (Nicholas), SZE
>
> It seems that the Heap Size shown in HDFS web UI is not accurate. It keeps
> showing 100% of usage. e.g.
> {noformat}
> Heap Size is 10.01 GB / 10.01 GB (100%)
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.