JEP proposed to target JDK 13: 350: Dynamic CDS Archives
mbien42 at gmail.com
Wed May 1 19:02:46 UTC 2019
Thank you very much for the detailed explanation Jiangli and Ioi.
On Wed, May 1, 2019 at 6:53 PM Ioi Lam <ioi.lam at oracle.com> wrote:
> The dynamic archive can also be shared across processes running on the
> same host, as long as they are running the same program.
> So if you're running multiple copies of the same program, then using the
> old method (single static archive) is roughly the same as the new method
> (static archive + dynamic archive).
> If your environment runs different programs that share the same set of
> libraries. e.g.,
> 2 processes running with "-cp:lib.jar:foo.jar FooApp"
> 4 processes running with "-cp:lib.jar:bar.jar BarApp"
> to achieve best sharing, you can create a static archive (using a
> classlist) for only the classes in lib.jar (and any other system classes
> used by these apps). Then, create two different dynamic archives, one
> for the "foo" app, and the other for the "bar" app.
Understood. My main confusion came from the fact that i thought that each
FooApp process was supposed to create its own dynamic archive based on the
last run of the program. But FooApp and BarApp should just have two
different dynamic archives, not six (one for each process).
Will -XX:ArchiveClassesAtExit=dynfoo.jsa skip archive creation if the file
already exists? Or is this flag only intended for the initial setup run of
> This way, the static archive can be shared across all 6 processes, and
> the dynamic archives can be shared among the processes running the same
> - Ioi
> On 5/1/19 8:27 AM, Michael Bien wrote:
> > since each JVM process would create its own dynamic class data
> > archive, on top of a static archive, i would assume that only the
> > static archive would be shared between processes, while the dynamic
> > archive would be mostly only beneficial for tuning startup time.
> > Manually created static AppCDS archives on the other hand are fully
> > shareable and can help with both, footprint and startup time.
> > Would this be correct or is more sharing magic going on between those
> > per-process archives?
> > (i suppose you could just use the dynamic CDS feature once and use the
> > dynamic archive just like it would be a second static & shareable
> > archive)
> > best regards,
> > michael
> > On 25.04.19 23:26, mark.reinhold at oracle.com wrote:
> >> The following JEP is proposed to target JDK 13:
> >> 350: Dynamic CDS Archives
> >> https://openjdk.java.net/jeps/350
> >> Feedback on this proposal from JDK Project Committers and Reviewers 
> >> is more than welcome, as are reasoned objections. If no such objections
> >> are raised by 23:00 UTC on Thursday, 2 May, or if they’re raised and
> >> then satisfactorily answered, then per the JEP 2.0 process proposal 
> >> I’ll target this JEP to JDK 13.
> >> - Mark
> >>  https://openjdk.java.net/census#jdk
> >>  https://cr.openjdk.java.net/~mr/jep/jep-2.0-02.html
More information about the jdk-dev