[Xquartz-dev] Some Performance Benchmarks

Kyle McKay mackyle at gmail.com
Mon Apr 5 16:42:49 PDT 2010


I just recently installed a copy of Mac OS X 10.6.3 (I don't bother  
with .0, .1, or .2 releases anymore -- not worth the pain) and I  
wanted to compare the speed of the graphics in Mac OS X 10.5.8 with  
10.6.3 since I've been hearing all this good stuff about the all the  
graphics changes in 10.6.x (there's even a VideoDecodeAcceleration  
framework now).

So I thought I'd start with Xquartz 2.5.0 using the glxgears  
application and see if anything turned up.  Sure did, so I thought I'd  
share for anyone who's interested.

GLXGEARS BENCHMARKS
===================

Mac Hardware:
   MacBook4,1
   Intel Core 2 Duo
   2.1 GHz (1 processor, 2 cores)
   L2 Cache: 3 MB
   Memory: 4 GB (2 x 2 GB 667 MHz DDR2 SDRAM)
   Bus Speed: 800 MHz
   Intel GMA X3100

Display Hardware:
   External display only (i.e. MacBook closed)
   Resolution: 1920 x 1080 (LCD Native Resolution)
   Depth: 32-Bit Color
   Core Image: Hardware Accelerated
   Main Display: Yes
   Quartz Extreme: Supported
   Mirror: Off

System Configuration 1 (SC1):
   Mac OS X 10.5.8 (9L30)
   Software Updates current through 2010-04-04
   X11 from xquartz.macosforge.org
   XQuartz 2.5.0 (xorg-server 1.7.6)

System Configuration 2 (SC2):
   Mac OS X 10.6.3 (10D573)
   Software Updates current through 2010-04-04
   System X11 from 10.6.3 install
   XQuartz 2.3.5 (xorg-server 1.4.2-apple53)

System Configuration 3 (SC3):
   Mac OS X 10.6.3 (10D573)
   Software Updates current through 2010-04-04
   X11 from xquartz.macosforge.org
   XQuartz 2.5.0 (xorg-server 1.7.6)

Test Configuration 1 (TC1):
   X11 rootless (i.e. X11 output full-screen mode OFF)
   Dock showing on right side of screen

Test Configuration 2 (TC2):
   X11 rootless (i.e. X11 output full-screen mode OFF)
   Dock hidden (in autohide mode, but mouse not over Dock)

Test Configuration 3 (TC3):
   X11 root window (i.e. X11 output full-screen mode ON)
   X11 root window is showing (i.e. takes over full screen)

Test Procedure 1 (TP1):
   Set up in a Spaces space with nothing on
   screen except the X11 xterm window (and
   possibly the Dock depending on the TC).
   With the machine otherwise idle, execute the
   following in an xterm and do not otherwise
   touch the mouse or keyboard until it's done:
     /usr/X11/bin/glxgears& sleep 31; kill -INT %%
   Discard the first line of output from the
   results and average the last 5 FPS values
   to give the test results.

Test Procedure 2 (TP2):
   Same as TP1 except using /opt/X11/bin/glxgears
   instead of /usr/X11/bin/glxgears.

Test Procedure 3 (TP3):
   Set up in a Spaces space with nothing on
   screen except the X11 xterm window (and
   possibly the Dock depending on the TC).
   With the machine otherwise idle, execute the
   following in an xterm and do not otherwise
   touch the mouse or keyboard until it's done:
     /usr/X11/bin/glxgears -fullscreen& sleep 31; kill -INT %%
   Discard the first line of output from the
   results and average the last 5 FPS values
   to give the test results.

Test Procedure 4 (TP4):
   Same as TP3 except using /opt/X11/bin/glxgears
   instead of /usr/X11/bin/glxgears.


SC1 TC1 TP1: 2170.9 FPS  Note: small gears
SC1 TC1 TP2:             Not available on 10.5.8
SC1 TC1 TP3:   59.8 FPS  Note: small gears
SC1 TC1 TP4:             Not available on 10.5.8

SC1 TC2 TP1: 2175.8 FPS  Note: small gears
SC1 TC2 TP2:             Not available on 10.5.8
SC1 TC2 TP3:  167.3 FPS  Note: small gears
SC1 TC2 TP4:             Not available on 10.5.8

SC1 TC3 TP1: 2168.0 FPS  Note: small gears
SC1 TC3 TP2:             Not available on 10.5.8
SC1 TC3 TP3:  196.2 FPS  Note: small gears
SC1 TC3 TP4:             Not available on 10.5.8


SC2 TC1 TP1:   61.0 FPS  Note: small gears
SC2 TC1 TP2:   60.8 FPS  Note: small gears
SC2 TC1 TP3:   29.9 FPS  Note: small gears
SC2 TC1 TP4:   29.9 FPS  Note: LARGE cropped gears

SC2 TC2 TP1:   60.8 FPS  Note: small gears
SC2 TC2 TP2:   60.6 FPS  Note: small gears
SC2 TC2 TP3:   29.9 FPS  Note: small gears
SC2 TC2 TP4:   29.9 FPS  Note: LARGE cropped gears

SC2 TC3 TP1:   59.6 FPS  Note: small gears
SC2 TC3 TP2:   59.6 FPS  Note: small gears
SC2 TC3 TP3:   29.9 FPS  Note: small gears
SC2 TC3 TP4:   29.9 FPS  Note: LARGE cropped gears


SC3 TC1 TP1: 2174.9 FPS  Note: small gears
SC3 TC1 TP2: 2169.3 FPS  Note: small gears
SC3 TC1 TP3:   59.8 FPS  Note: small gears
SC3 TC1 TP4:   59.8 FPS  Note: LARGE cropped gears

SC3 TC2 TP1: 2172.0 FPS  Note: small gears
SC3 TC2 TP2: 2173.1 FPS  Note: small gears
SC3 TC2 TP3:  201.2 FPS  Note: small gears
SC3 TC2 TP4:  144.3 FPS  Note  LARGE cropped gears

SC3 TC3 TP1: 2188.8 FPS  Note: small gears
SC3 TC3 TP2: 2182.4 FPS  Note: small gears
SC3 TC3 TP3:  359.0 FPS  Note: small gears
SC3 TC3 TP4:  146.0 FPS  Note: LARGE cropped gears


When glxgears is run by itself you get a smallish window with gears  
that fully fit in the window.  That's what "small gears" means.  All  
the places where it says "small gears" have exactly the same size  
gears.  In the case of -fullscreen they are simply displayed in the  
bottom left corner of the glxgears full screen window.

When glxgears is run with "-fullscreen" using the /opt/X11/bin/ 
glxgears from Xquartz 2.5.0, you get VERY LARGE gears in the full  
screen window.  So large that about the top third of the top gear is  
cropped off as it's off the top of the screen and about the bottom  
third of the lower gear is also cropped off as it's off the bottom of  
the screen.  The right most gear is fully on screen.  These gears are  
much, much, much larger than the ones drawn when running the system- 
installed /usr/X11/bin/glxgears without any options.

So why does the glxgears output differ with -fullscreen?  And which is  
the correct glxgears behavior?  The newer glxgears installed as /opt/ 
X11/bin/glxgears or the old behavior of /usr/X11/bin/glxgears?  And if  
the newer behavior is correct, are the gears supposed to be drawn so  
large they get cropped?

SUMMARY

The version of glxgears that produces VERY LARGE gears when run in - 
fullscreen mode does not seem to be available via the 2.5.0  
installation from MacOSForge for Leopard 10.5.8.

Comparing the performance of 10.5.8 Xquartz 2.5.0 vs. 10.6.3 Xquartz  
2.5.0 the better performance of OpenGL on 10.6.3 vs. 10.5.8 can be  
seen when in -fullscreen mode (so long as the dock is not underneath  
the fullscreen window in rootless mode) giving from a 20% (rootless  
mode) to an 83% (rooted mode) speedup.  Although, if the dock is  
sitting underneath the fullscreen window in rootless mode there's no  
performance gain at all.

Comparing the performance of the stock system X11 vs. Xquartz 2.5.0 on  
10.6.3 shows that Xquartz 2.5.0 way outperforms the stock X11.   
Presumably there would be a similar difference on 10.5.8 but I didn't  
have a stock X11 installation on 10.5.8 to try.  For the normal-sized  
glxgears Xquartz 2.5.0 performs from 3456% to 3512% better than the  
stock X11!  For the -fullscreen mode it's anywhere from only 100%  
better (with the Dock underneath the full screen glxgears window) to  
1100% better (in rooted mode using the small gears in -fullscreen).

So the takeaways are:

1. Best GLX performance is had by 10.6.3 with Xquartz 2.5.0 in rooted  
mode
2. Next best performance is had by 10.6.3 with Xquartz 2.5.0 in  
rootless mode with the Dock hidden or at least not underneath the GLX  
window.
3. Even with the Dock underneath the GLX window, Xquartz 2.5.0 is  
still twice as fast as the stock X11, but performance really suffers  
in this configuration (at least on the GMA X3100 hardware).
4. 10.6.3 has a faster OpenGL implementation than 10.5.8 and the  
bigger the window and the more pixels being drawn the more noticeable  
the improvement (this probably depends somewhat on the display  
hardware present, but this appears to be the situation with the GMA  
X3100 anyway).

The performance difference between the stock X11 and Xquartz 2.5.0 is  
so dramatic that Apple's really doing people a disservice by not  
including Xquartz 2.5.0 in a Software Update.  I'm sure it will  
eventually get picked up into an update for 10.6.x, but in the  
meantime there's the Xquartz installer from MacOSForge.

Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-dev/attachments/20100405/16d7b357/attachment-0001.html>


More information about the Xquartz-dev mailing list