JDK-6708580 : Java applications slow when EXA enabled
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u5
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2008-05-29
  • Updated: 2013-05-01
  • Resolved: 2009-01-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u12Fixed 7 b43Fixed
Description
FULL PRODUCT VERSION :
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b24)
Java HotSpot(TM) Server VM (build 11.0-b12, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux mach1.mach 2.6.25 #3 SMP Sun Mar 25 22:45:33 CEST 2007 i686 i686 i386 GNU/Linux


EXTRA RELEVANT SYSTEM CONFIGURATION :
Fedora-8, intel-2.1.1 driver, EXA accaleration enabled, Intel-945GM

A DESCRIPTION OF THE PROBLEM :
When I enable EXA accaleration on my Laptop which is equipped with an intel 945 class GPU performance of java application is terrible.

Especially text seems to suffer a lot (Java2D->Mix->BezierScroller "fullwindow" with text only down to 7fps from several hundreds fps). When antialiasing of fonts is disabled the demo gets 100fps, which is not good but better.
Swing applications are hurt a lot, resizing and scrolling is painful.

Also applets are slower.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install Linux with intel-driver and enable EXA

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no slowdown
ACTUAL -
very large slowdown

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
java -jar demo/jfc/Java2Demo/Java2Demo.jar
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Run with:
    -Dsun.java2d.pmoffscreen=false 
however it makes X over network horrible slow, and its still slower (sometimes half the speed) of with XAA.

Comments
SUGGESTED FIX http://hg.openjdk.java.net/jdk7/2d/jdk/rev/15435c60c751
2008-12-04

EVALUATION A fix was proposed to disable the use of pixmaps for the local X server case, when shared memory pixmaps aren't available.
2008-12-01

EVALUATION Apparently newer X server/distros have EXA acceleration enabled by default, and that disables shared memory pixmaps and places Pixmaps in vram permanently, which kills our performance if we have to read from them (like in case with antialiased text). xrender to the rescue!
2008-11-25

EVALUATION Looks like this driver places the Pixmaps into video memory which makes readbacks very slow. I'd suggest trying to set J2D_PIXMAPS=shared env. variable before starting the application and see if it helps. This will place all pixmaps into shared memory and prevent them from being pushed to vram. It will not affect the remote X case. Also, I'm assuming this is not a regression in 6u10 and can be reproduced in earlier releases. Please confirm.
2008-05-29