United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6708580 Java applications slow when EXA enabled
JDK-6708580 : Java applications slow when EXA enabled

Details
Type:
Bug
Submit Date:
2008-05-29
Status:
Resolved
Updated Date:
2013-05-01
Project Name:
JDK
Resolved Date:
2009-01-09
Component:
client-libs
OS:
linux
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
6u5
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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
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
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

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
SUGGESTED FIX

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



Hardware and Software, Engineered to Work Together