You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Devaraj Das (JIRA)" <ji...@apache.org> on 2006/12/12 10:36:23 UTC

[jira] Created: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Allow the sort benchmark to set a buffersize for the map buffer
---------------------------------------------------------------

                 Key: HADOOP-816
                 URL: http://issues.apache.org/jira/browse/HADOOP-816
             Project: Hadoop
          Issue Type: Improvement
          Components: mapred
            Reporter: Devaraj Das
         Assigned To: Devaraj Das


Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-816?page=comments#action_12457852 ] 
            
Owen O'Malley commented on HADOOP-816:
--------------------------------------

Why did you introduce map.buffer.size.mb to replace io.sort.mb? Better naming or are you intending to use io.sort.mb as the size to buffer in the reduce?

I'm not sure that making sort adaptive to the block size is right. There are many reasonable configurations when your jvm heap size for the tasks is smaller than your block sizes.

Since the defaults are currently:
  dfs block size: 64mb
  map buffer: 100 mb

I think we are ok, although I guess it would be reasonable to print a LOG.warn if the blocksize was bigger than the buffer size, since that will lead to lower performance.

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Devaraj Das updated HADOOP-816:
-------------------------------

    Attachment: 816.patch

Added the default setting for map.buffer.size.mb in hadoop-default.xml

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Devaraj Das updated HADOOP-816:
-------------------------------

    Attachment:     (was: 816.patch)

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-816?page=comments#action_12458018 ] 
            
Devaraj Das commented on HADOOP-816:
------------------------------------

Well, for some reason, I had the impression that the default dfs block size is 128 MB, and that is why I was bothered about the sort benchmark performance.. As Owen suggested, I will just put a log message if a spill happens on the Map side.

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Devaraj Das updated HADOOP-816:
-------------------------------

    Status: Patch Available  (was: Open)

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Devaraj Das resolved HADOOP-816.
--------------------------------

    Resolution: Won't Fix

I am closing this for now. There are two reasons - the LOG.info when a spill happens is already there. The other reason is taking the info message to the user's console should probably be done after 801/805. I think we can postpone all that for the future.

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Devaraj Das updated HADOOP-816:
-------------------------------

    Attachment: 816.patch

Added code in Sort.java that will look at the dfs blocksize of a file in the input path, and depending on the blocksize, will infer the map buffer size and set a config in jobconf (this is because the sort benchmark spawns maps that each work on dfs blocksize amount of data)
Added a new config variable - map.buffer.size.mb in MapTask.java that will control the buffer size (currently the buffer size is controlled by io.sort.mb). Decided to make this independent since io.sort.mb has some bearing on the buffer sizes for the buffers created during reading/writing files; wanted to keep those buffer sizes separate from the map buffer size.

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-816?page=all ]

Owen O'Malley updated HADOOP-816:
---------------------------------

    Status: Open  (was: Patch Available)

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-816) Allow the sort benchmark to set a buffersize for the map buffer

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HADOOP-816?page=comments#action_12457667 ] 
            
Hadoop QA commented on HADOOP-816:
----------------------------------

+1, http://issues.apache.org/jira/secure/attachment/12346986/816.patch applied and successfully tested against trunk revision r483772

> Allow the sort benchmark to set a buffersize for the map buffer
> ---------------------------------------------------------------
>
>                 Key: HADOOP-816
>                 URL: http://issues.apache.org/jira/browse/HADOOP-816
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Devaraj Das
>         Assigned To: Devaraj Das
>         Attachments: 816.patch
>
>
> Discovered that framework merges are the hotspots where most time is spent in the sort benchmark. With HADOOP-331, the Map phase could potentially do a merge of the spills (this merge was not done pre-HADOOP-331), and then there is one compulsory merge on each reduce. It may be good to avoid the merge in the Map phase, if possible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira