]> git.cworth.org Git - cworth.org/blob - src/exa/i965/render_bench.mdwn
Convert prefix directives to new syntax.
[cworth.org] / src / exa / i965 / render_bench.mdwn
1 [[!meta title="Running render_bench against EXA/i965"]]
2
3 [[!tag exa performance xorg i965]]
4
5 Earlier this month I attended the X Developers' Summit in Cambridge,
6 UK (not the Cambridge near Boston, USA). We stayed at Clare College
7 which, like all of the University of Cambridge colleges that I saw, is
8 immaculately well-kept and quite beautiful. Just look at the
9 [gardens](http://www.clare.cam.ac.uk/about/gardens.html) I walked past
10 every day to get from my room to the conference room in the
11 library. Kudos to the X.Org foundation for arranging such a beautiful
12 site, (I think Daniel Stone and Matthew Garrett deserve particular
13 thanks), and for providing travel expenses so I could attend.
14
15 Adam "ajax" Jackson was kind enough to write up some [notes on my
16 talk](http://www.x.org/wiki/Events/XDS2007/Notes#head-d045b0de9e63cb633cdac00d4c3e9140cfb2e7eb)
17 and the other talks as well. I haven't posted slides from the talk,
18 but it really wasn't much more than a condensed version of exa-related
19 blog entries I've made, (and which are linked to in Adam's writeup).
20
21 One of the things I asked for in the talk is more benchmarks for 2D
22 rendering---in particular real-world applications with benchmarking
23 modes and micro-benchmarks distilled from real-world
24 applications. Vincent Torri recently reminded me that Carsten
25 "rasterman" Haitzler wrote
26 [render_bench](http://www.rasterman.com/files/render_bench.tar.gz) a
27 long time ago precisely to measure the performance of XRender, (and to compare it to his imlib2 software).
28
29 I hadn't run `render_bench` since I started playing with EXA and the
30 i965 chip, so it was definitely a worthwhile thing to do. Here are the
31 results I got (comparing XAA and EXA both against imlib2):
32
33 [[!img render_bench-offscreen.png]]
34
35 All of the numbers are from the same 2.13GHz dual-core Intel
36 machine. But the absolute numbers aren't interesting anyway. The
37 interesting part is the huge improvement in X Render performance going
38 from XAA to EXA for the i965 device. It goes from 2-8 times slower
39 than imlib2 to 1.3-12.9 times faster. Anyone interested in the raw
40 times can view the [EXA
41 log](http://cworth.org/exa/i965/render_bench/render_bench-exa.log) and
42 [XAA
43 log](http://cworth.org/exa/i965/render_bench/render_bench-xaa.log)
44 files.
45
46 One thing that would be useful is for someone to augment the framework
47 to also test the same drawing operations through cairo. It would be
48 good to verify that none of the cairo software layers get in the way
49 of this performance, (I can imagine cairo doing something like setting
50 up and tearing down XRender Picture objects rather than reusing them,
51 but hopefully it will perform just as well).
52
53 And I should point out that this improvement is not due to anything
54 I've done. This is basically just an upstream xserver tree, (it might
55 have my glyph-pixmaps change but they are not relevant here). So kudos
56 to the EXA hackers I mentioned in my talk, (Keith Packard, Zack Rusin,
57 Eric Anholt, and Michel Dänzer). I definitely need to amend my [what
58 EXA gets right](http://cworth.org/exa/what_exa_gets_right/) post to
59 add image-scaling to window-copying and solid-fills.
60
61 This also isn't with any special hacks to the xf86-driver-intel
62 source, (I'm using upstream commit 286f5df0b from Sep. 6). This
63 benchmark clearly isn't hitting the same compositing slowness I'm
64 seeing with [glyph
65 rendering](http://cworth.org/exa/i965/eliminating_glyph_fallbacks/)
66 and that might be because it's using larger images than the generally
67 tiny images that are used for glyphs, (but I'm just guessing---I
68 haven't looked closely).
69
70 Meanwhile, I am rewriting the driver to eliminate all the syncs and
71 flushes when compositing to fix the glyph performance. I hope to have
72 something worth sharing soon.
73
74 Finally, I also compared the results of `evas_xrender_x11_test with
75 evas_software_x11_test`. This is similar to the original `render_bench`,
76 but with a more real-world framework in place, (the evas canvas), as
77 opposed to just a micro benchmark. Here XRender/EXA did not fare as
78 well, scoring an evas benchmark score of 4.994 compared to the 10.418
79 of the software version. (Meanwhile XAA scored 4.840 but with some
80 noticeably incorrect results---the large scaled image came out just
81 black). The weaker performance here might very well be because the
82 evas tests do include text which `render_bench` does not, (but again I'm
83 just guessing and haven't looked closely).
84
85 Oh, and the evas snapshot I used for this test is
86 [evas-0.9.9.023](http://enlightenment.freedesktop.org/fetch.php?file=evas-0.9.9.023.tar.gz). I
87 tried to also test a newer snapshot such as
88 [evas-0.9.9.041](http://download.enlightenment.org/snapshots/2007-08-26/evas-0.9.9.041.tar.gz),
89 but it seems to not build the `evas_*_test` programs anymore. Perhaps
90 they're now available separately?