Performance of X (x11perf vs framebuffer vs test program)

Roland Scheidegger rscheidegger_lists at hispeed.ch
Wed Apr 26 04:47:24 PDT 2006


Bilderbeek, Manuel wrote:
> Hello,
> 
> I did some performance measurements again and I'd like to hear your
> comment.
> 
> I did the following tests, all on an 800x600x16bpp configuration, on a
> Via Epia ML, 800MHz on CLE266
> 1) fill 500x500 rectangles in the Linux framebuffer device, using a
> memset for each line (see a previous mail on xorg mailinglist),
> compilation with -O1
> 2) fill 500x500 rectangles with Java and Qt (didn't make a difference)
> on X  (see a previous mail on xorg mailinglist)
> 3) use x11perf -rect500
> 
> I did these experiments both an a Debian testing system with Xorg 6.9
> and a 2.6.15 kernel for 486, using fbdev and via drivers, and on a
> MontaVista Linux (MVL) 4.0.1, with an Xorg 6.8.2 installation
> (configured as 'tinyX', with only the fbdev driver) and a 2.6.10 kernel
> tailored for Via C3.
> 
> The results are the number of 500x500 rectangle fills per second.
> 
> 
> On Debian
> 1) 172
> 2) fbdev driver: 50, via driver (with hardware acceleration): more than
> about 2000
> 3) fbdev driver: 169, via driver (with hardware acceleration): 3550
> 4) as 2), but with the Rotate "CW" option: fbdev (driver says: using
> shadowfb): 23, via (driver says: hardware acceleration disabled, using
> shadowfb): 40
> 5) as 3), but with the Rotate "CW" option: fbdev (as above): 124, via
> (as above): 79
> 
> On MVL:
> 1) 190
> 2) fbdev driver: 59
> 3) fbdev driver: 230
> 4) as 2), but with the Rotate "CW" option (as above): fbdev: 20
> 5) as 3), but with the Rotate "CW" option (as above): fbdev: 193
> 
> 
> Some things about this are quite weird in my eyes:
> 1) how can the x11perf program be faster than the C program with memset?
> 2) why is (on fbdev driver), the Qt/Java program more than a factor 3
> slower (see previous mails about this, "Overhead of X11"), while all CPU
> load is in X, according to atop?
> 3) in connection with 2): why is x11perf performing so much better than
> the Qt/Java prog? Is this test comparable?
> 4) (most interesting for the OpenChrome folks) how on earth can the via
> driver be 50% slower than the fbdev driver, when the Rotate option is
> set?

Some guesses:
1) it is just barely faster. maybe it uses some memset-like thing which 
turns out to be faster for frame buffer devices.
2) A guess may be that Qt/Java in fact don't use the draw rectangle or 
whatever it's called primitive of Xlib, but simply use pixmaps 
everywhere. They might (not that I think it's likely) do stupid things 
which cause much more cpu processing in the X process (e.g. if they'd 
draw pixel-by-pixel the overhead in the program itself would be fairly 
low, but certainly there would be a lot of overhead in the X process).
3) x11perf certainly will be using the draw rectangle primitive. I don't 
think it really should be that much faster (as you would expect the 
performance to be limited by the speed which you can write to the 
framebuffer) but maybe it's better optimized...
4) since the via driver disables acceleration, you would expect it to be 
the same performance probably. Maybe there is some overhead in the via 
driver, or fbdev is somehow better optimized for doing rotation.

Those are all pretty much wild guesses... You should try something like 
oprofile to see where the time is actually spent if you want to 
understand why performance behaves like that.

Roland





More information about the xorg mailing list