1

I got some problems by using JFX Applications. On my local developing system(Linux) my application got a cpu usage about 0-2%. When I install and run my application on the customer windows vm system, the cpu usage is much higher, about 50-70%. This phenomenon occurs only on a VM System. If i run the application on a local windows system everything runs fine. Therefore i guess it is related to the vm graphic adapter and his configuration. But the customer says there is no graphic adapter configuration available. I researched similar performance problems and I tried some JVM options like:

-Dprism.order=es2,es1,sw,j2d
-Dsun.java2d.opengl=true
-Dprism.vsync=false
-Dprism.forceGPU=true

The option -Dprism.order=es2,es1,sw,j2d reduced the usage under 25%. Still to high but i dont know what else can i do?

Edit: Thanks for the reply. When in run the app without -Dprism.order=es2,es1,sw,j2d i got follwoing message and 70% cpu usage:

D3DPipelineManager: Created D3D9Ex device Direct3D initialization succeeded (X) Got class = class com.sun.prism.d3d.D3DPipeline Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline 

When i run the app with the option i got following message and 20% cpu usage:

Prism pipeline name = com.sun.prism.sw.SWPipeline (X) Got class = class com.sun.prism.sw.SWPipeline Initialized prism pipeline: com.sun.prism.sw.SWPipeline 
Dennis
  • 143
  • 5
  • 17
  • Try adding an option -Dprism.verbose=true which spits out verbose setup logging. That should tell you what path JavaFX is taking in the VM. Relevant but not exactly duplicate: http://stackoverflow.com/questions/26536841/javafx-animation-poor-performance-consumes-all-my-cpu – Gimby Nov 10 '15 at 12:00
  • Thanks for the reply. When in run the app without -Dprism.order=es2,es1,sw,j2d i got follwoing message and 70% cpu usage: D3DPipelineManager: Created D3D9Ex device Direct3D initialization succeeded (X) Got class = class com.sun.prism.d3d.D3DPipeline Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline When i run the app with the option i got following message and 20% cpu usage: Prism pipeline name = com.sun.prism.sw.SWPipeline (X) Got class = class com.sun.prism.sw.SWPipeline Initialized prism pipeline: com.sun.prism.sw.SWPipeline – Dennis Nov 10 '15 at 13:11

1 Answers1

0

According to the JavaFX architecture, if the rendering engine cannot find suitable hardware accelerated pipeline, it falls back to software rendering, which is CPU intensive. Since it is a VM system that's having the issue, it is possible that either graphics drivers are not properly installed and/or outdated and/or not supported by JavaFX. Similar thing goes for DirectX libraries, as this is the technology JavaFX uses on Windows. Another thing to check would be if the VM configuration itself allows hardware acceleration (this is usually defined when the configuration is created).

So, steps to take:

  1. Check VM configuration
  2. Update JDK
  3. Update graphics drivers (typically supplied by the VM software provider)
  4. Update DirectX

Having done that, you should be able to track down the issue, or at least narrow down things affecting the performance

Community
  • 1
  • 1
AlmasB
  • 3,377
  • 2
  • 15
  • 17
  • Thanks for the reply. I will try to contact the the service contractor which is responsible for the configuration of the VM of the customer – Dennis Nov 10 '15 at 14:20