You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Min Zhou (JIRA)" <ji...@apache.org> on 2011/06/07 12:53:58 UTC

[jira] [Commented] (HADOOP-7339) Introduce a buffered checksum for avoiding frequently calls on Checksum.update()

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

Min Zhou commented on HADOOP-7339:
----------------------------------

terasort 1GB on the same cluster , each job is ran more than 10 times, using intel vtune for profiling. 

# buffer(8KB) + pure java crc32 , 58.6s (CPU)
# buffer(1MB) + intel ipp optimized zlib crc32 (JNI), 60.8s (CPU)
# buffer(64KB) + intel ipp optimized zlib crc32 (JNI), 61.3s (CPU)
# pure java crc32, 62.0s (CPU)
# buffer(8KB) + intel ipp optimized zlib crc32, 64.1s (CPU)
# zlib crc32(JNI), 69.8s (CPU)
# intel ipp optimized zlib crc32, 703.s (CPU) 

It shows that BufferedChecksum + PureJavaCrc32 should be the best choice.
Thanks Kungong for sharing and testing the original patch.

> Introduce a buffered checksum for avoiding frequently calls on Checksum.update()
> --------------------------------------------------------------------------------
>
>                 Key: HADOOP-7339
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7339
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Min Zhou
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7339-v1.diff, HADOOP-7339-v2.diff
>
>
> We found that PureJavaCRC32/CRC32.update() is the TOP 1 of the methods consuming CPU in a map side, and in reduce side, it cost a lots of CPU too.
> IFileOutputStream would frequently call Checksum.update() during writing a record. It's very common a MR key/value less than 512 bytes. Checksum.update() would be called every time writing a key/value. 
> Test case: terasort 100MB. 
> Checksum.update() calls has be reduced from 4030348 to 28069.  This method is not a hotspot anymore.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira