JDK-4691554 : Converter: Regtest Performance Regression
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.4.1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,solaris_8
  • CPU: sparc,itanium
  • Submitted: 2002-05-24
  • Updated: 2013-11-01
  • Resolved: 2003-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Charset Converter seems to have a big performance regression problem since hopper-b11.  I ran some regression test progran in ja locale and in C locale on Solaris.  Testing in ja locale is so slow compared with testing in C locale. However, there might be a regression not only in ja locale but also in C locale.  4691440 was filed for a timeout in C locale.

(Example1)
  4691440: test/sun/io/Converter/EuroConverter.java, output of `time`
  C locale with hopper-b12
    real    0m3.21s
    user    0m1.58s
    sys     0m0.18s

  C locale with hopper-b10
    real    0m1.22s
    user    0m1.01s
    sys     0m0.11s

  ja locale with hopper-b12
    real    0m47.74s         <---------
    user    0m45.78s         <---------
    sys     0m1.65s          <---------

  ja locale with hopper-b10
    real    0m3.13s
    user    0m1.12s
    sys     0m0.26s

(Example2) 
  4690287: test/sun/io/Converter/TestConv.java
    This test took 2 minutes in C locale, 30 minutes in ja locale to pass with hopper-b12.

I added a test program which reproduces the regresesion and a profile.

###@###.### 2002-05-24


Examples which were added on 2002-05-24 were recorded on Solaris.  I add another example which shows how it is slow on Itanium regardless of
locales.

(Example3)
  4691440: test/sun/io/Converter/EuroConverter.java, output of `time`
  en_US locale with hopper-b13
    real    21m34.311s         <---------
    user    20m33.955s         <---------
    sys     0m5.836s           <---------

  en_US locale with hopper-b10
    real    0m11.648s
    user    0m3.813s
    sys     0m0.243s

  ja locale with hopper-b13
    real    22m13.922s          <---------
    user    20m21.591s          <---------
    sys     0m7.811s            <---------

  ja locale with hopper-b10
    real    0m11.901s
    user    0m3.860s
    sys     0m0.227s

###@###.### 2002-05-29
///////////////////////////////////////////

###@###.### 2002-06-11

Name: as83306			Date: 05/24/2002

Regression test sun/io/Converter/EuroConverter.java fails with Hopper build 12 on Itanium RedHat 7.2 Linux, host north-star.  This test failed with an increased timeout factor of 4 x that of the original timeout value for this test.

 For test hardware config's, see http://sqesvr.eng/st3/jdk1.4/docs/Merlin-hw.html
#Test Results (version 2)
#Sat May 18 01:57:44 PDT 2002
#checksum:1e3ea2d63a8b5f37
#-----testdescription-----
$file=/export0/regression/jdk1.4.1Tests/b12/sun/io/Converter/EuroConverter.java
$root=/export0/regression/jdk1.4.1Tests/b12
keywords=bug4114080
run=ASSUMED_ACTION main EuroConverter\n
source=EuroConverter.java
title=Make sure the euro converters, which are derived from existing converters, only differ from their parents at the expected code 
point.

#-----environment-----

#-----testresult-----
description=file:///export0/regression/jdk1.4.1Tests/b12/sun/io/Converter/EuroConverter.java
end=Sat May 18 01:57:44 PDT 2002
environment=regtest
execStatus=Failed. Execution failed: Program `/export0/java/jdk141-64b12/bin/java' interrupted! (timed out?)
javatestOS=Linux 2.4.9-18smp (ia64)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Sat May 18 01:55:39 PDT 2002
status=Failed. Execution failed: Program `/export0/java/jdk141-64b12/bin/java' interrupted! (timed out?)
test=sun/io/Converter/EuroConverter.java
work=/export0/results/regression/hopper/b12/dnm-dtf-023.SFBay.Sun.COM2.4.9-18smp-jthb12-jdk141b12.05-17.19.10-ALL/sun/io/Converter

#section:script_messages
----------messages:(5/254)----------
JDK under test: (/export0/java/jdk141-64b12)
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b12)
Java HotSpot(TM) 64-Bit Core VM (build 1.4.1-beta-b12, interpreted mode)
Timeout signalled after 120.0 seconds

#section:build
----------messages:(3/99)----------
command: build EuroConverter 
reason: Named class compiled on demand
elapsed time (seconds): 4.969
result: Passed. Compilation successful

#section:compile
----------messages:(3/172)----------
command: compile /export0/regression/jdk1.4.1Tests/b12/sun/io/Converter/EuroConverter.java 
reason: .class file out of date or does not exist
elapsed time (seconds): 4.923
----------System.out:(0/0)----------
----------System.err:(0/0)----------
result: Passed. Compilation successful

#section:main
----------messages:(3/127)----------
command: main EuroConverter
reason: Assumed action based on file name: run main EuroConverter 
elapsed time (seconds): 480.007
----------System.out:(4/173)----------
Checking encoder ISO8859_15_FDIS against ISO8859_1
Checking encoder Cp923 against ISO8859_15_FDIS
Checking encoder Cp858 against Cp850
Checking encoder Cp1140 against Cp037
----------System.err:(0/0)----------
result: Failed. Execution failed: Program `/export0/java/jdk141-64b12/bin/java' interrupted! (timed out?)


test result: Failed. Execution failed: Program `/export0/java/jdk141-64b12/bin/java' interrupted! (timed out?)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b20 VERIFIED IN: tiger-beta2
14-06-2004

EVALUATION The test(s) performed are encoding/decoding Strings of small lengths and there are some known peformance penalties with the NIO converters for smaller Strings. However, based on the profile output and some other observations one possible contributory factor having a negative effect on performance is the thread local caching of converter logic in java/lang/StringCoding.java especially for converters which have no current NIO implementation (eg the codepages tested in the sun/io/Converter/EuroConverter regression test). So far I haven't located any code within the concrete NIO Charset Encoder/Decoder classes which is contributing significantly to the observed performance regressions. Continuing to investigate. ###@###.### 2002-05-29 The regression tests cited (sun/io/Converter/EuroConverter) and to a similar extent, TestConv.java exaggerate by a significant amount the performance penalties associated with performing String decode/encode operations on small Strings. In particular EuroConverter when cross checking parent and Euro codepage encodings flip flops between 2 encodings for every rountrip conversion in some cases and this multiplies the performance effects. These tests shouldn't be used alone to infer performance regressions as they are written to test the functionality of the converters. Their execution profile would not be typical of user applications. However, the StringCoding most recently used caching logic should be revisited to eliminate uneccessary lookups. ###@###.### 2002-05-31 The timeout - long test execution time issues can be addressed by removing the code within TestConv.java which tests the NIO coders and by providing a more optimized test execution strategy (by performing bulk conversion rather than single byte/char per buffer decoding/encoding). This should speed up the tests considerably and eliminate the annoying timeout effects introduced in 1.4.1. ###@###.### 2002-09-19
19-09-2002