[Xcb] best-case X no-op performance measurement

Jamey Sharp jamey at minilop.net
Sat Jun 10 14:46:29 PDT 2006


I wanted to measure baseline performance under ideal conditions for an X
app that generates NoOperation requests as fast as possible, so I wrote
a simple test program. It constructs a buffer of 1,024 requests, and
then repeatedly writes that buffer to the X server. Note that as written
it can deadlock with the server: this should not be considered a good
example of X programming. :-)

NoOperation is a worst-case benchmark for any X client library, which is
why I keep using it. For all other requests, the speed of the client
library matters less, and usually much less. Also, I haven't found any
optimizations that make only NoOperation faster: everything that helps
here also helps at least some other requests.

On my laptop, using Xvfb, here are the results in NoOperation requests
per second after everything is cached and Speedstep kicks in:

baseline: 17.6 million
old Xlib: 12.8 million
XCB:       4.4 million
  hacked:  5.8 million
Xlib/XCB:  2.7 million

The XCB hacked results come from hand-fixing some code generation flaws,
specifically bug #6686 and removing useless iovecs. Notice the nice 32%
improvement. Josh and I have talked about how to get these fixes into
the XSLT, but some of the work is tricky.

Anyway, just thought I'd share. Source for this and other Xlib and XCB
test apps I've been fiddling with is currently here:
	http://minilop.net/svn/jamey/trunk/test/xlib/
This new test is noop-raw.c.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060610/9b76cd61/attachment.pgp


More information about the Xcb mailing list