Modular LIBJVM.SO library for Docker

Aleksei Voitylov aleksei.voitylov at bell-sw.com
Tue May 25 11:37:27 UTC 2021


Tibor,

GC algorithms only account for a fraction of libjvm.so size. For
example, if you remove Epsilon, Parallel, CMS, Shenandoah, and G1 the
size of the JVM only reduces by ~3 MB. After stripping (iff you believe
this is a good trade-off) that reduces to ~ 2.5 Mb.

-Aleksei

On 24/05/2021 22:26, Tibor Digana wrote:
> Hi,
>
> The size of the library "libjvm.so"o is bigger than Java modules, and
> bigger or comparable with the size of the application in the Docker image.
>
> After processing the JDK by the JLINK and shrinking the native library "
> libjvm.so" my JRE is 35MB big in Docker image but the "libjvm.so" is too
> big, i.e. 18MB (from the original size 22MB) and the modules have only 12MB.
>
> We have many GC algorithms in the JVM and maybe this is the reason why the
> library is bigger than the Java modules and then JLINK does not become much
> effective.
>
> Can you please develop a modular JVM library so that I would be able to
> select only one algorithm of GC which means that the modules with other GC
> algorithms would not appear in my Docker image?
>
> Thx
> Tibor



More information about the hotspot-dev mailing list