JDK-6507183 : REGRESSION: slower performance of GZIPInputStream for 5u10 (single threaded testcase)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 5.0u10
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2006-12-21
  • Updated: 2010-07-29
  • Resolved: 2006-12-21
Related Reports
Relates :  
Relates :  
Relates :  
Description
5u6 is faster than 5u10 if we compare the performance of the GZIPInputStream.

$ java -DLOOPS=1000 -showversion CpuPerformanceInflateBytes
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)

time: 17982

$ java -DLOOPS=1000 -showversion CpuPerformanceInflateBytes
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode)

time: 19582

The microbenchmark is attached to this report.

Comments
EVALUATION This is not a bug, but an unfortunate consequence of the needs to balance simple performance as shown by the test with scalability of applications with multiple threads. While there is a performance degradation, it was deemed an acceptable tradeoff by reviewers. I have re-written the test to not use Serialization nor BufferedInputStream, to limit any impacts outside of zip code; see CpuPerformanceInflateBytes3.java (attached), and all numbers below use this newer test. The performance drop actually first occurs in 1.5.0_07, due to the fix for 6206933. Performance on win32 actually improves from 1.5.0_07 onwards. Solaris-amd64: java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode) time: 3560 time: 3911 time: 4039 java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode) time: 4389 time: 4393 time: 4403 java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) time: 3997 time: 4019 time: 4023 Win32: java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b04) Java HotSpot(TM) Client VM (build 1.5.0_06-b04, mixed mode) time: 7031 time: 6359 time: 6344 java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode) time: 2187 time: 2203 time: 2172 java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode) time: 2328 time: 2297 time: 2234
21-12-2006