You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Wei Zheng (JIRA)" <ji...@apache.org> on 2015/08/20 20:23:46 UTC

[jira] [Updated] (HIVE-10793) Hybrid Hybrid Grace Hash Join : Don't allocate all hash table memory upfront

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

Wei Zheng updated HIVE-10793:
-----------------------------
    Issue Type: Sub-task  (was: Bug)
        Parent: HIVE-11587

> Hybrid Hybrid Grace Hash Join : Don't allocate all hash table memory upfront
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-10793
>                 URL: https://issues.apache.org/jira/browse/HIVE-10793
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>    Affects Versions: 1.2.0
>            Reporter: Mostafa Mokhtar
>            Assignee: Mostafa Mokhtar
>              Labels: TODOC1.3
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: HIVE-10793.1.patch, HIVE-10793.2.patch
>
>
> HybridHashTableContainer will allocate memory based on estimate, which means if the actual is less than the estimate the allocated memory won't be used.
> Number of partitions is calculated based on estimated data size
> {code}
> numPartitions = calcNumPartitions(memoryThreshold, estimatedTableSize, minNumParts, minWbSize,
>           nwayConf);
> {code}
> Then based on number of partitions writeBufferSize is set
> {code}
> writeBufferSize = (int)(estimatedTableSize / numPartitions);
> {code}
> Each hash partition will allocate 1 WriteBuffer, with no further allocation if the estimate data size is correct.
> Suggested solution is to reduce writeBufferSize by a factor such that only X% of the memory is preallocated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)