About performance of D-Bus

Matthew Johnson dbus at matthew.ath.cx
Thu Oct 25 03:43:59 PDT 2007


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
format.

No payload: 2549 RT/second
256 byte array) 256000 bytes in 469ms (in 1000 calls / 2132 CPS): 0.5205078125MB/s
512 byte array) 512000 bytes in 294ms (in 1000 calls / 3401 CPS): 1.66064453125MB/s
1024 byte array) 1024000 bytes in 283ms (in 1000 calls / 3533 CPS): 3.4501953125MB/s
2048 byte array) 2048000 bytes in 288ms (in 1000 calls / 3472 CPS): 6.78125MB/s
4096 byte array) 4096000 bytes in 359ms (in 1000 calls / 2785 CPS): 10.87890625MB/s
8192 byte array) 8192000 bytes in 515ms (in 1000 calls / 1941 CPS): 15.1640625MB/s
16384 byte array) 16384000 bytes in 750ms (in 1000 calls / 1333 CPS): 20.828125MB/s
32768 byte array) 32768000 bytes in 1294ms (in 1000 calls / 772 CPS): 24.125MB/s
256 string) 256000 bytes in 1794ms (in 1000 calls / 557 CPS): 0.135986328125MB/s
512 string) 512000 bytes in 2041ms (in 1000 calls / 489 CPS): 0.23876953125MB/s
1024 string) 1024000 bytes in 2294ms (in 1000 calls / 435 CPS): 0.4248046875MB/s
2048 string) 2048000 bytes in 2562ms (in 1000 calls / 390 CPS): 0.76171875MB/s
4096 string) 4096000 bytes in 2865ms (in 1000 calls / 349 CPS): 1.36328125MB/s
8192 string) 8192000 bytes in 3241ms (in 1000 calls / 308 CPS): 2.40625MB/s
16384 string) 16384000 bytes in 3787ms (in 1000 calls / 264 CPS): 4.125MB/s
32768 string) 32768000 bytes in 4610ms (in 1000 calls / 216 CPS): 6.75MB/s

I ususally test against my own daemon implementation, rather than dbus-daemon
these are the results for that:

No payload: 1571 RT/second
256 byte array) 256000 bytes in 666ms (in 1000 calls / 1501 CPS): 0.366455078125MB/s
512 byte array) 512000 bytes in 395ms (in 1000 calls / 2531 CPS): 1.23583984375MB/s
1024 byte array) 1024000 bytes in 401ms (in 1000 calls / 2493 CPS): 2.4345703125MB/s
2048 byte array) 2048000 bytes in 387ms (in 1000 calls / 2583 CPS): 5.044921875MB/s
4096 byte array) 4096000 bytes in 409ms (in 1000 calls / 2444 CPS): 9.546875MB/s
8192 byte array) 8192000 bytes in 424ms (in 1000 calls / 2358 CPS): 18.421875MB/s
16384 byte array) 16384000 bytes in 452ms (in 1000 calls / 2212 CPS): 34.5625MB/s
32768 byte array) 32768000 bytes in 606ms (in 1000 calls / 1650 CPS): 51.5625MB/s
256 string) 256000 bytes in 1106ms (in 1000 calls / 904 CPS): 0.220703125MB/s
512 string) 512000 bytes in 1476ms (in 1000 calls / 677 CPS): 0.33056640625MB/s
1024 string) 1024000 bytes in 1846ms (in 1000 calls / 541 CPS): 0.5283203125MB/s
2048 string) 2048000 bytes in 2214ms (in 1000 calls / 451 CPS): 0.880859375MB/s
4096 string) 4096000 bytes in 2608ms (in 1000 calls / 383 CPS): 1.49609375MB/s
8192 string) 8192000 bytes in 3077ms (in 1000 calls / 324 CPS): 2.53125MB/s
16384 string) 16384000 bytes in 3740ms (in 1000 calls / 267 CPS): 4.171875MB/s
32768 string) 32768000 bytes in 4685ms (in 1000 calls / 213 CPS): 6.65625MB/s

Interestingly, dbus-daemon is faster on small arguments, but on large byte
arrays my daemon is faster.

Matt

--
www.matthew.ath.cx
D-Bus Java
-------------- 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/dbus/attachments/20071025/8419f77e/attachment-0001.pgp 


More information about the dbus mailing list