hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <>
Subject [jira] [Commented] (HIVE-6429) MapJoinKey has large memory overhead in typical cases
Date Thu, 20 Feb 2014 02:19:20 GMT


Sergey Shelukhin commented on HIVE-6429:

Measured memory savings; 1 million row hashtable; option one - double+int key, double+string

Before (not sure why there's one less key, might be heap dump or profiler glitch)
|Class|Objects|Shallow Size|Retained Size|

|Class|Objects|Shallow Size|Retained Size|

Savings are ~9%.
Not as large as expected, as apparently Java has large overhead for byte arrays, 9-byte array
takes 32 bytes and 17-byte one has 40.
Still, reasonably good, perhaps the patch can be extended.
Or different hashtable used...

> MapJoinKey has large memory overhead in typical cases
> -----------------------------------------------------
>                 Key: HIVE-6429
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>         Attachments: HIVE-6429.01.patch, HIVE-6429.WIP.patch, HIVE-6429.patch
> The only thing that MJK really needs it hashCode and equals (well, and construction),
so there's no need to have array of writables in there. Assuming all the keys for a table
have the same structure, for the common case where keys are primitive types, we can store
something like a byte array combination of keys to reduce the memory usage. Will probably
speed up compares too.

This message was sent by Atlassian JIRA

View raw message