Re: DBus performance about 20X slower than basic client/server
- From: Juanjo Marin <juanjomarin96 yahoo es>
- To: Gnome Accessibility List <gnome-accessibility-list gnome org>
- Subject: Re: DBus performance about 20X slower than basic client/server
- Date: Fri, 16 Jul 2010 07:07:30 +0200
On Wed, 2010-07-14 at 16:21 -0700, Bill Cox wrote:
> I've done some performance testing of D-Bus vs a simpler IPC message
> package. On average, the simplest test message that asks for a
> response in DBus takes almost 200 microseconds per call. In the
> simpler IPC socket based package, it's only 10 microseconds per round
> trip call. The upshot is that DBus is about 20X slower than a basic
> socket based client/server communication mechanism.
>
> I'm worried that DBus will become an Orca performance bottleneck. Is
> there anything we can do about DBus? The reference implementation we
> use is 70K lines, and my vote would be a new implementation designed
> for performance.
>
You can read another D-Bus vs IPC comparison here:
http://blogs.gnome.org/abustany/2010/05/20/ipc-performance-the-return-of-the-report/
The conclusion is:
"The overhead of a UNIX socket based IPC is around 19%, while the
overhead of DBus is 322%. However, it is important to take into account
the fact that DBus is a much more flexible system, offering far more
features and flexibility than our socket protocol. Comparing DBus and
our custom UNIX socket based IPC is like comparing an axe with a swiss
knife: it’s much harder to cut the tree with the swiss knife, but it
also includes a tin can opener, a ball pen and a compass (nowadays some
of them even include USB keys).
Actually, the new file descriptor passing feature of DBus (added by
Lennart Poettering) brings us the best of both worlds: high level,
flexible IPC for method calls, and fast data transfer using a pipe for
heavy transfers. On the benchmarks, pipes are even a bit faster than
sockets.
The code source used to obtain these results, as well as the numbers and
graphs used in this document can be checked out from the following git
repository: git://git.mymadcat.com/ipc-performance . Please check the
various README files to see how to reproduce them and/or how to tune the
parameters.
DBus 1.3, not released as “stable” as of today"
I hope this help you,
-- Juanjo Marín
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]