About performance of D-Bus
thiago at kde.org
Thu Oct 25 04:26:00 PDT 2007
Em Thursday 25 October 2007 12:43:59 Matthew Johnson escreveu:
> On Thu Oct 25 11:46, Thiago Macieira wrote:
> > Em Thursday 25 October 2007 09:09:47 tian tian escreveu:
> > > I want to use D-Bus as communication mechanism between processes.
> > > But I am not sure if it can work effectually on my PXA310(ARM, about
> > > 600MHz), so I did some performance test as follows:
> > My own tests (executed on an Intel Core 2 Duo 2133 MHz). The payloads
> > were byte arrays ("ay") and strings ("s") consisting of the number
> > indicated times the letter 'a'. I used stock D-Bus 1.0.2 and Qt 4.4.0
> > snapshot, compiled in release mode.
> Out of interest, I wrote something like this for my Java implementation,
> which doesn't use libdbus at all. All the test are round trips (send the
> array, get an empty reply). Since sending happens in a different thread
> it's hard to time if you don't wait for a reply. The no payload test is
> also a round-trip, just with the Ping() method. Byte arrays are
> zero-copy, everything else is stored internally different from the wire
What I meant by one-way was:
1) place call over D-Bus with one, single argument consisting of the data
2) wait for the empty reply from the other side
[my implementation is actually sending the size of the data received]
By round-trip, the remote side echoes back the data, so it's a round-trip
transmission of the payload.
The no-payload test is just a round-trip call.
> Interestingly, dbus-daemon is faster on small arguments, but on large byte
> arrays my daemon is faster.
dbus-daemon reads in chunks of 2048 bytes, so my guess is that you get a high
barrier to cross above that.
Also note that, due to protocol overhead, a 2048-byte array is an
approximately 2200-byte send (around 150 bytes in the header [depends on the
service name, object name and interface name you're calling!] and 2052 in the
payload [2048 bytes + 32-bit size])
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20071025/46da11a6/attachment.pgp
More information about the dbus