Skip navigation

Lots of numbers from running cairo-traces on a i5-2500, which has a Sandybridge GT1 GPU (or more confusingly called HD2000), and also a Radeon HD5770 discrete GPU.

Performance results

The key results being the geometric mean of all the traces as compared to using a software rasteriser:

UXA (snb): 1.6x slower
glamor (snb): 2.7x slower
SNA (snb): 1.6x faster
GL (snb): 2.9x slower

EXA (r600g): 3.8x slower
glamor (r600g): 3.0x slower
GL (r600g): 2.7x slower

fglrx (xlib): 4.7x slower
fglrx (GL): 32.0x slower [not shown as it makes the graphs even more difficult to read]

All bar one of the acceleration methods is worse (performance, power, latency, by any metric) than simply using the CPU and rendering directly within the client. Note also that software rasterisation is currently more performant than trying to use the GPU through the OpenGL driver stack.

(All software, except for the xserver which was held back to keep glamor working, from git as of 20121228.)

Advertisement

6 Comments

  1. Out of interest was the r600g test using Prime or do you have a MUX?

    • That was a desktop system with a PCI-E Radeon card. An X server created for each of the two GPUs, one at a time and run independently. I do use it as a testbed for PRIME offloading, but PRIME was not used in this test.

  2. On a stable Linux distribution with a stable graphics driver release, what is the benefit of Cairo using a GPU backend? As far as I can tell, using a GPU backend will be less stable, potentially be subject to rendering bugs, and, according to your data, slower.

    • Yes, you might say a product of a decade of willful neglect. As with many things we had the opportunity to do hardware acceleration of modern 2D and accelerated composited desktops first (they were in the X server long before even OS/X made the shift to its accelerated compositing model), but failed to follow through on the execution.

      The benefits, then as now is that with a well designed driver, using the GPU is faster and more power efficient. And for a power constrained architecture (such as Intel’s integrated graphics) that difference is important.

        • cosinusoidally
        • Posted January 11, 2013 at 1:12 pm
        • Permalink

        I still think it is a bit weird that Cairo uses 2d acceleration by default, when the CPU can currently do a better job. Didn’t you say that using the GPU (I mean on UXA) currently uses more power than using the CPU? As you say yourself “All bar one of the acceleration methods is worse (performance, power, latency, by any metric) than simply using the CPU and rendering directly within the client.” Is there some config option I can set to drop everything back to the image backend? Something like gfx.xrender.enabled=false in Firefox.

        Even on mobile browsers it has been common practice to disable GPU rendering until it is actually beneficial. Same with Google Chome on both desktop (Linux desktop at least) and ChromeOS.

        I understand that SNA will eventually be a win, but all us Ubuntu 12.04 Intel GPU users are stuck with UXA. Is SNA likely to come to Ubuntu 12.04?

        • ickle
        • Posted January 11, 2013 at 3:33 pm
        • Permalink

        From a pragmatic point of view, you are correct. Ideally we should have pushed much harder for better drivers long ago, and by accepting the status quo nothing will ever improve.

        I have a set of demos in http://cgit.freedesktop.org/~ickle/cairo-demos which can compare rendering client-side and pushing to the display versus rendering in the server. Excuse the formatting:

        r600g xlib image | snb xlib image (fps)
        dragon: 426 375 | 562 415
        fish: 172 2 | 319 39
        gears: 220 395 | 841 435
        maze: 58 206 | 278 213
        waterfall: 133 440 | 864 598

        They are much simpler than a cairo-trace, aiming to isolate a small number of features that are easy to accelerate in a single test. (Akin to the performance demos at http://ie.microsoft.com/testdrive/Default.html)

        Anyway even accounting for the transport overhead of pushing the image from the client to the screen (via SHM) in all but a few cases client-side rendering is a win for EXA-class drivers. Of course, this means backporting more recent versions of Cairo to 12.04 and choosing not to backport stable driver updates.

        Perhaps, one way to experiment with your system is to set the CAIRO_DEBUG=xrender-version=-1 environment variable in your session. (Hmm in theory at least.)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: