Bug 878181 - OpenJDK 1.7 does not create classes.jsa after installation
Summary: OpenJDK 1.7 does not create classes.jsa after installation
Keywords:
Status: CLOSED DUPLICATE of bug 513605
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Deepak Bhole
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-19 19:55 UTC by Lukas Zapletal
Modified: 2012-11-20 01:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-20 01:47:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Zapletal 2012-11-19 19:55:33 UTC
IBM contributed -Xshare option to Java (and OpenJDK as well):

$ java -X 2>&1 | grep share
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.

More about this: http://www.ibm.com/developerworks/library/j-sharedclasses/?ca=dgr-jw22ClassShareJRE&S_Tact=105AGX59&S_cmp=GRsitejw22

The option can be used to share classes and improve loading times, which can be dramatic. For Windows, classes cache is generated by default. In Fedora, the cache is not created.

I recommend to run the following command in the post installation section of the RPM package:

java -Xshare:dump

It creates about 25 MB file /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/server/classes.jsa

Using -Xshare user can take advantage of faster loading, it can be measure even on the hello world application (much more on big applications like Eclipse):

[lzap@lzapx Download]$ time java -Xshare:on -cp . HelloWorldApp
Hello World!

real	0m0.051s
user	0m0.038s
sys	0m0.012s

[lzap@lzapx Download]$ time java -Xshare:off -cp . HelloWorldApp
Hello World!

real	0m0.076s
user	0m0.061s
sys	0m0.012s

By default it should use the class cache if it is found, but this is not working (is this a bug?):

[lzap@lzapx Download]$ time java -cp . HelloWorldApp
Hello World!

real	0m0.072s
user	0m0.054s
sys	0m0.017s

Tested with F16 and F17, selecting rawhide as I expect this is not implemented.

Comment 1 Andrew John Hughes 2012-11-20 01:47:15 UTC

*** This bug has been marked as a duplicate of bug 513605 ***


Note You need to log in before you can comment on or make changes to this bug.