[ 
https://issues.apache.org/jira/browse/TEZ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14599606#comment-14599606
 ] 

Saikat commented on TEZ-2574:
-----------------------------

another example would be, say 48mb block and key size 10mb, value size 10mb
-in old implementation, 48 mb will be split into 16 mb meta space and 32mb 
value space. and only 1 KV pair will fit.
-in new implementation, 48 mb will be split into 8mb meta space and 40mb value 
space, and 2KV pair can fit in a span.



> Make a better metadata Value split choice in Pipeline sort
> ----------------------------------------------------------
>
>                 Key: TEZ-2574
>                 URL: https://issues.apache.org/jira/browse/TEZ-2574
>             Project: Apache Tez
>          Issue Type: Improvement
>            Reporter: Saikat
>            Assignee: Saikat
>         Attachments: TEZ-2574.patch
>
>
> In the current implementation of pipeline sort, when a new sort span object 
> is created with a hard coded value of 1M items and 16 bytes per item.
> According to the present code logic, 
>       int metasize = METASIZE*maxItems;
>       int dataSize = maxItems * perItem;
>       if(capacity < (metasize+dataSize)) {
>         // try to allocate less meta space, because we have sample data
>         metasize = METASIZE*(capacity/(perItem+METASIZE));
>       }
> if capacity is less than 32mb, the buffer will be halved into meta and value 
> buffers, which is not efficient.
> We need a more generic split, based on the KV pair size written to the buffer.



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

Reply via email to