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

Todd Lipcon commented on MAPREDUCE-5821:
----------------------------------------

The issue is that, if the input buffer doesn't have room for the value, it will 
allocate a new array. But, whenever the Merger calls nextRawValue on a disk 
file, it always first resets the buffer to {{diskIFileValue.getData()}} which 
is empty. So, at the entry to that function, the length is always 0, and the 
code path which reallocs is always taken.

> IFile merge allocates new byte array for every value
> ----------------------------------------------------
>
>                 Key: MAPREDUCE-5821
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5821
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: performance, task
>    Affects Versions: 2.4.1
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>
> I wrote a standalone benchmark of the MapOutputBuffer and found that it did a 
> lot of allocations during the merge phase. After looking at an allocation 
> profile, I found that IFile.Reader.nextRawValue() would always allocate a new 
> byte array for every value, so the allocation rate goes way up during the 
> merge phase of the mapper. I imagine this also affects the reducer input, 
> though I didn't profile that.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to