huge memory consumption of javafx app on linux (no

2019-08-12 22:35发布

I need help to figure out what is the problem with my current setup, cause it seems that when I fire a javafx application, looking at the activity monitor I see memory growing very rapidly and never shrinking.

My system is: Kubuntu wili, jdk 8u66 64 bit, hp envy laptop with 8 gigs of ram.

My test is: launch Ensemble8 sample application from oracle this way:

java -jar -XX:+UseG1GC -Dprism.verbose=true Ensemble8.jar

where first option is supposed to help the jvm releasing memory to the system, and the second is a debugging option for the rendering system prism.

As soon as I launch it, application memory is 142.400 Kb which is fine by me. I scroll down and click on the "service" example and click on the button "refresh" (which starts an animation, my first guess about where the problem is) and memory jumps to 186.764 Kb. Pressing it again I get:

232 Mb
290 Mb
340 Mb
514 Mb
618 Mb
720 Mb

and so on... Now it's very easy to fill up the system memory just by keep pressing the button.

It seems to me that there is a huge problem with the garbage collector, on the linux system, because when I do the test on my Windows 10 partition, I don't have such problems, meaning that the memory is released, stabilizing at around 200 Mb. My suspicion about the animation is because I first experienced this issue on an app I did which hogged the system just by animating a scrollbar.

Anybody else experiencing memory issues with javafx 8 on a linux 64 bit system?

0条回答
登录 后发表回答