[Xcb] XPutImage and context switches / roundtrips?

Clemens Eisserer linuxhippy at gmail.com
Tue Sep 23 06:50:21 PDT 2008


Hi,

> I believe the 4k buffer size in libxcb should be revisited.  Note that
> in Xlib, the buffer size could be changed both at compile time by
> redefining XLIBDEFAULTBUFSIZE and at runtime with the XLIBBUFFERSIZE
> environment variable.  But really, 4k seems too small.

I created a benchmark (tries to simulate some real-world load I have)
where the "old" xlib is twice as fast as xlib/xcb.
I don't know for sure if this is only buffer-size related, so I filed
a bug 17735, not mentioning the buffer size.
Maybe this was because of Redhat set the buffer-size to something >16k
in Fedora7 (I guess so), however even with the default 16kb buffer I
would see only 1/4 of the context switches I am experiencing now.

What I would prefer would be a xcb-api to set the buffer-size at
runtime, because many apps simply don't need large buffers (well, but
a bit bigger than 4k would not a bad idea in general).
And those who do, know it and can set it to something reasonable.

I reported the performance problem including a test-case here:
https://bugs.freedesktop.org/show_bug.cgi?id=17735

- Clemens


More information about the Xcb mailing list