-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment is bigger than with other JREs #511
Comments
I'd also check if the modules list is the same ( |
You are right - the modules differ:
also just from the amount of modules it is hard to compare, so I decided to extract the modules container and compare the uncompressed storage size of the modules too:
so yes - the uncompressed modules from JBR are ~ 38MB bigger than the counterpart of Azul/Adoptium. But a difference of 38MB should not be the same difference after being compressed with LZMA! |
I'm not sure I understand what exactly is the issue you would like to get addressed here? |
When I use JBR as the JRE inside my app, I see that the deployment is unnaturally bigger in comparison to other JREs. The difference in my deployment is ~40MB (packaged size) which is kinda huge and I just wanted to ask you, if there is a good reason that you packaged the As I wrote above, the main reason why the deployment is quite different in size is the way you have built |
I recently switched from the Azul JRE to the JBR JRE and recognized, that my deployment is much bigger than with the Azul JRE.
Hunting down the issue has shown me, that the
/lib/modules
from your JRE heavily differs from Azul (and also Adoptium, which I analyzed too). It looks like that on JBR the modules container has been built with the parameter--compress=2
(probably here if I found the right script: https://github.com/JetBrains/JetBrainsRuntime/blob/jbr-release-21.0.6b872.80/jb/project/tools/windows/scripts/mkimages_x64.sh#L64) which results in a "slightly" compressed modules container (57MB vs 100MB from Azul/Adoptium).This leads to another "problem" if you package your final app for deployment (especially with LZMA - I've tested XZ and ZSTD) - the modules can't be compressed any further (57MB from the JRE -> 53MB compressed) while other JVMs (Azul/Adoptium) can be compressed by far better (100MB from the JRE -> 24MB compressed).
Having said this, I also compared the compression of the whole JRE between JBR/Azul/Adoptium (all 21.0.6) with XZ and the best compression algorithm. I know that the JREs differ slightly, but the finally compressed archive should not differ that much. But JBR is by far bigger than others:
To get those results, I made many tests comparing different parts of the JVM at all and it looks like LZMA cannot compress the modules any further.
Having said this, I am unsure what benefits the compression of
/lib/modules
offers beside saving ~43MB of storage (runtime). The drawback here is that the JVM probably needs to extract the container at runtime (performance) and the deployment size is just bigger for many use cases (especially if you plan to re-package the final deployment with LZMA - waste of bandwidth).The text was updated successfully, but these errors were encountered: