You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hari Sankar Sivarama Subramaniyan (JIRA)" <ji...@apache.org> on 2015/11/06 02:20:27 UTC
[jira] [Updated] (HIVE-12310) Update memory estimation login in
TopNHash
[ https://issues.apache.org/jira/browse/HIVE-12310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hari Sankar Sivarama Subramaniyan updated HIVE-12310:
-----------------------------------------------------
Attachment: HIVE-12310.1.patch
[~thejas] Can you please review the patch.
Thanks
Hari
> Update memory estimation login in TopNHash
> ------------------------------------------
>
> Key: HIVE-12310
> URL: https://issues.apache.org/jira/browse/HIVE-12310
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Reporter: Thejas M Nair
> Assignee: Hari Sankar Sivarama Subramaniyan
> Attachments: HIVE-12310.1.patch
>
>
> HIVE-12084 changes TopNHash to use Runtime.getRuntime().freeMemory() for finding available memory.
> However, it does not give the all the memory it could use, it ignores unallocated memory. This is because the heap size of jvm grows up to max heap size (-Xmx) as per it needs. totalMemory() gives total heap space it has allocated, and freeMemory() is the free memory within that.
> See http://i.stack.imgur.com/GjuwM.png and http://stackoverflow.com/questions/3571203/what-is-the-exact-meaning-of-runtime-getruntime-totalmemory-and-freememory .
> So instead of using Runtime.getRuntime().freeMemory() , I think it should use maxMemory() - totalMemory() + freeMemory()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)