You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Ravuri Sushma sree (Jira)" <ji...@apache.org> on 2022/12/21 04:50:00 UTC

[jira] [Assigned] (AMBARI-25823) Fix the widget.json for the Host memory used %

     [ https://issues.apache.org/jira/browse/AMBARI-25823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravuri Sushma sree reassigned AMBARI-25823:
-------------------------------------------

    Assignee: Ravuri Sushma sree

>  Fix the widget.json for the Host memory used %
> -----------------------------------------------
>
>                 Key: AMBARI-25823
>                 URL: https://issues.apache.org/jira/browse/AMBARI-25823
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Ravuri Sushma sree
>            Assignee: Ravuri Sushma sree
>            Priority: Major
>
> Heatmap is displayed wrongly. The main reason for that is currently the formula used is
> "value": "${((mem_total - mem_cached - mem_free)/mem_total)*100}"
>  
> But as per host_info.py
> 'mem_free': bytes2kilobytes(mem_stats.available) if hasattr(mem_stats, 'available') else 0, # the actual amount of available memory
> We mark the 'available' memory from psutil.virtual_memory() command as the free memory. Basically this is wrong. 'free' memory is the memory available after the cached memory getting reduced from total memory but the 'available' memory is the total available memory including the cached memory as that can be reclaimed anytime.
>  
> So mem_free is nothing but mem_available. So in the host memory used heat map we should just do
> (mem_total-mem_free)/mem_total to get the used memory fraction. 
>  
> This is what psutil.virtual_memory() internally does to get the used percentage.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org