Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.2
    • Fix Version/s: 0.22.0, 0.23.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Improve the buffer utilization of ZlibCompressor to avoid invoking a JNI per write request.

      Description

      Thanks for Hong Tang's advice.

      Sub task created for the first optimization. HADOOP-6662 closed.

        Issue Links

          Activity

          Hide
          Kang Xiao added a comment -

          Patch attached.

          Show
          Kang Xiao added a comment - Patch attached.
          Hide
          Todd Lipcon added a comment -

          Hi Xiao,

          Do you have any benchmarks on this? Would be interesting to see.

          -Todd

          Show
          Todd Lipcon added a comment - Hi Xiao, Do you have any benchmarks on this? Would be interesting to see. -Todd
          Hide
          Kang Xiao added a comment -

          A comparision test was performed on a 1.8GB web log file. The result is as follows:

          read file buffer size write to compress stream buffer size old time(secs) new time(secs) decrease %
          65536 100 67 49 26.8%
          65536 200 56.5 46.5 17.7%
          65536 400 51.5 45 12.6%
          65536 800 48.5 44.5 8.2%
          65536 1024 46.8 44.2 9.8%
          65536 4096 45 43.5 3.3%
          65536 65536 44.6 43.2 3.1%

          Is there any standard benchmark for compression suitable for this case?

          Show
          Kang Xiao added a comment - A comparision test was performed on a 1.8GB web log file. The result is as follows: read file buffer size write to compress stream buffer size old time(secs) new time(secs) decrease % 65536 100 67 49 26.8% 65536 200 56.5 46.5 17.7% 65536 400 51.5 45 12.6% 65536 800 48.5 44.5 8.2% 65536 1024 46.8 44.2 9.8% 65536 4096 45 43.5 3.3% 65536 65536 44.6 43.2 3.1% Is there any standard benchmark for compression suitable for this case?
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12440826/ZlibCompressor.java.patch
          against trunk revision 932115.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12440826/ZlibCompressor.java.patch against trunk revision 932115. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/452/console This message is automatically generated.
          Hide
          Kang Xiao added a comment -

          This patch does not add any new function and he test case src/test/org/apache/hadoop/core/io/compress/TestCodec.java has covered this patch.

          Show
          Kang Xiao added a comment - This patch does not add any new function and he test case src/test/org/apache/hadoop/core/io/compress/TestCodec.java has covered this patch.
          Hide
          Kang Xiao added a comment -

          This optimization for zlibcompressor has been deployed in our cluster and works as expected.

          Is there any more work needed for this patch to be reviewed or resolved?

          Show
          Kang Xiao added a comment - This optimization for zlibcompressor has been deployed in our cluster and works as expected. Is there any more work needed for this patch to be reviewed or resolved?
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12440826/ZlibCompressor.java.patch
          against trunk revision 1031422.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//testReport/
          Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12440826/ZlibCompressor.java.patch against trunk revision 1031422. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/41//console This message is automatically generated.
          Hide
          Eli Collins added a comment -

          Hey Kang, patch looks good. Apologies for the slow reply.

          +1

          Show
          Eli Collins added a comment - Hey Kang, patch looks good. Apologies for the slow reply. +1
          Hide
          Eli Collins added a comment -

          Thanks also for running the performance tests. I built the native libs and ran TestCodec which picks up the native lib if it's available.

               [exec] 
               [exec] -1 overall.  
               [exec] 
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec] 
               [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
               [exec]                         Please justify why no new tests are needed for this patch.
               [exec]                         Also please list what manual steps were performed to verify this patch.
               [exec] 
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec] 
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec] 
               [exec]     +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.
               [exec] 
               [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
               [exec] 
               [exec]     +1 system test framework.  The patch passed system test framework compile.
               [exec] 
          
          Show
          Eli Collins added a comment - Thanks also for running the performance tests. I built the native libs and ran TestCodec which picks up the native lib if it's available. [exec] [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no new tests are needed for this patch. [exec] Also please list what manual steps were performed to verify this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] +1 system test framework. The patch passed system test framework compile. [exec]
          Hide
          Eli Collins added a comment -

          I've committed this to branch 22 and trunk. Thanks Kang!

          Show
          Eli Collins added a comment - I've committed this to branch 22 and trunk. Thanks Kang!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #442 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/442/)
          HADOOP-6683. ZlibCompressor does not fully utilize the buffer. Contributed by Kang Xiao

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #442 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/442/ ) HADOOP-6683 . ZlibCompressor does not fully utilize the buffer. Contributed by Kang Xiao
          Hide
          Kang Xiao added a comment -

          Thanks Collins!

          Show
          Kang Xiao added a comment - Thanks Collins!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #523 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/523/)
          HADOOP-6683. ZlibCompressor does not fully utilize the buffer. Contributed by Kang Xiao

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #523 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/523/ ) HADOOP-6683 . ZlibCompressor does not fully utilize the buffer. Contributed by Kang Xiao

            People

            • Assignee:
              Kang Xiao
              Reporter:
              Kang Xiao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development