Benchmark of Wayland
justinlee5455 at gmail.com
Fri Nov 12 20:20:29 PST 2010
Yep, I guess cairo-gl used by Wayland should get similar performance
boosts as cairo-drm if it's also direct-rendered (by mesa-dri?). It
seems that mixing 2D drawings with 3D drawings makes problems,
therefore we want to draw everything by OpenGL even if for 2D
graphics. Maybe that's the purpose of cairo-gl i.e. being a wrapper
library which use OpenGL to draw 2D graphics.
I am interested in comparing benchmarks of cairo-drm and Wayland,
because Wayland is still uses client-server architecture like X.
Although Wayland integrates together the X server and the compositing
window manager to form a single-process, see the 2nd diagram in
which eliminates many overheads. But Wayland client and Wayland server
are still in separate processes. As far as I know, X Window suffers
from overheads due to its client-server architecture, such as
1. Round-trip delay time between client and server for synchronized request.
2. Context switch overhead. IPC overhead. (Unix domain socket?)
3. X protocol overhead. (package and buffer commands)
as we can see in
hence I guess the overheads above also exist in Wayland. I expect the
benchmark comparison will show how much performance drop are made by
Wayland's client-server architecture.
Yet another related stuff, according to page 29 of "Why X Is Not Our
Ideal Window System" <http://www.std.org/~msm/common/protocol.pdf>, it
"The X protocol’s network-transparent client-server model is less
efficient than a direct-procedure-call window system, such as SunView
or Microsoft Windows."
sounds like we should make everything direct-procedure-called as much
as possible in order to maximum our system's performance. Therefore I
guess we could further improve Wayland's performance (don't know how
much will improve and if it's worth though) by turning all things
Wayland server/compositor does into direct-procedure calls (that is
without any context switch ...well it sounds like talking rubbish as I
don't aware of any technical/logical issues).
2010/11/11 Kristian Høgsberg <krh at bitplanet.net>:
> On Thu, Nov 11, 2010 at 4:08 AM, Justin Lee <justinlee5455 at gmail.com> wrote:
>> Chris Wilson has been playing around with direct-rendered cairo (cairo-drm)
>> and notice very promising results:
>> * Gradients are 100x - 120x faster
>> * Some painting operations are 50x faster
>> * Text is 4x faster
>> If I didn't get it wrong, Wayland apps are also direct-rendered. I'm
>> not sure if Wayland runs on my video chip SiS 661 (I think it
>> doesn't), but it seems there have been some successful builds and
>> executions of Wayland as I can see in Wayland group and this list.
>> It will be good if similar benchmark could be observed in Wayland. I
>> expect Wayland will have the same order of performance as cairo-drm
>> although it depends on hardware and driver.
> cairo-drm works as well under wayland as it does under X. But it's
> not a way forward in either case. It's a proof of concept to show how
> fast cairo can go, and the challenge is to get cairo-gl and the gl
> drivers to match that. GLES2 is a fine interface for what cairo
> needs, and there's no reason we shouldn't be able to make that fast.
> It's not going to work on the SiS 661, unfortunately.
More information about the wayland-devel