United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7107613 scalability blocker in javax.crypto.CryptoPermissions
7107613 : scalability blocker in javax.crypto.CryptoPermissions

Details
Type:
Bug
Submit Date:
2011-11-02
Status:
Resolved
Updated Date:
2013-01-18
Project Name:
JDK
Resolved Date:
2012-09-17
Component:
security-libs
OS:
generic
Sub-Component:
javax.crypto
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u40

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
CryptoPermissions uses Hashtable as internal collection.
Lock contention on the Hashtable broke scalability.
Patch is suggested, where ConcurrentHashMap is used.
The attached webrev.zip contain suggested patch.

Gives +12% to SPECjbb2012(encrypted transport) on T4-4.

                                    

Comments
Pavel, why no-need-test? It even has related issue for test development. I will update the label for now

                                     
2013-01-18
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/9ca10ab155e3
User:  lana
Date:  2012-12-28 18:30:44 +0000

                                     
2012-12-28
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/9ca10ab155e3
User:  coffeys
Date:  2012-12-20 17:35:22 +0000

                                     
2012-12-20
SQE/OK for accepting this fix
                                     
2012-10-03
**may be necessary for SPECjbb2012 numbers.
                                     
2012-09-30
EVALUATION

signed binaries pushed to closed repo :
http://closedjdk.us.oracle.com/jdk7u/jdk7u-dev/jdk/make/closed/rev/af86159206d1
                                     
2012-09-05
EVALUATION

backport, signed binaries to follow..
                                     
2012-09-03
EVALUATION

The suggested patch replaces the usage of Hashtable w/ ConcurrentHashMap.
This will introduce an incompatiblity in serialization format as CryptoPermissions class are declared to be serializable and the field "perms" (which used to be Hashtable) are part of the serialized bytes.

The easiest approach would be to bump out the serialVersionUID to indicate the incompatibility between different JDK releases after making this Hashtable -> ConcurrentHashMap performance enhancement.

Otherwise, we may have to employ some custom serialization methods to maintain the old serialization format to ensure compatibility.
                                     
2012-07-09



Hardware and Software, Engineered to Work Together