IcedTea-Web icon indicating copy to clipboard operation
IcedTea-Web copied to clipboard

AdoptOpenJDK memory used inefficiently compare to Oracle JRE when open JNLP

Open pucch03 opened this issue 3 years ago • 6 comments

Hi Support Team,

Observed below issue in my local lab and customer as well.

When we use the AdoptOpenJDK jre-8.0.265.01 to launch JNLP file it is taking more memory than Oracle JRE. Please find the screenshots and data below

1. Launch JNLP file with OpenJDK - memory consuming 675,668‬ KB C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\bin>javaws oneclick.jnlp

image

2. Launch JNLP file with OpenJDK with -Xnofork option - memory consuming 1,501,572KB C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\bin>javaws -Xnofork oneclick.jnlp

image

3. Launch JNLP file with Oracle JRE - memory consuming 498,948KB

image

Please note

  1. Tested on same machine with OpenJDK and Oracle JRE
  2. Above data is my local lab testing and difference is less, but in customer case difference is huge due to large data in the application
  3. In customer case
  • With Oracle JRE, 1Gb DRAM was used,
  • With OpenJDK, 2.7Gb DRAM is used
  • With OpenJDK and -Xnofork , 4 Gb DRAM is used

Business Impact: Noticed much higher memory utilization when OpenJDK is being used. As the customer uses a jumpserver for the users to connect, this greatly limits the number of users that can connect.

Could you please review and help if any parameters/flags can be used to optimize the memory usage.

Thanks Channa

pucch03 avatar Mar 19 '21 13:03 pucch03

Hi Support Team,

Could you please help on this.

Thanks Channa

pucch03 avatar Mar 22 '21 12:03 pucch03

Hi Channa, Tuning ITW for a specific application is hard. Best you can do is to pass -Xms as a jvm argument in the JNLP. If you are already doing this then this will explain why -Xnofork uses more memory. Because by preventing the forking of a second JVM all the benefits of the jvm arguments are lost.

sclassen avatar Mar 25 '21 09:03 sclassen

Thanks sclassen for the update.

Currently we are passing arguments as below in JNLP file, this is what you mean (-Xms) ??

java-vm-args="--add-modules=java.se.ee" href="http://java.sun.com/products/autodl/j2se"
initial-heap-size="96m" max-heap-size="1024m"

This is also taking more memory than ORACLE JRE, you can notice same in my issue description.

Do we have any fine tuning options for openJDK to resolve this Please help

Thanks Channa

pucch03 avatar Mar 25 '21 16:03 pucch03

You could give https://github.com/karakun/OpenWebStart a try. It has some optimizations for running in a remote desktop environment. Internally OWS is using ITW so if your application is running with ITW it should also run with OWS.

sclassen avatar Apr 01 '21 08:04 sclassen

@sclassen, Thanks for the update.

We officially not certified/validated OpenWebStart(OWS), we need memory fine tuning option in ITW. Would like to know, is any possibility is there or not in ITW.

Thanks Channa

pucch03 avatar Apr 06 '21 07:04 pucch03

Sorry to hear that. The way to add this support would be in the launcher. I think it is written in rust. We have nobody with rust experience on the team and are therefore currently not able to add such an option.

sclassen avatar Apr 08 '21 08:04 sclassen