[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: About performance of D-Bus
From: "tian tian" <mr.zoufeng () gmail ! com>
Date: 2007-10-26 7:33:09
Message-ID: e0188e800710260033p7a036e81rb550454a122af061 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Many thanks for all these advices.
I did some more tests today. As Havoc's advice, I changed the code:
mode = DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED;
to
mode = DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY;
, then re-compile D-Bus V1.0.2 with:
./configure --host=arm-linux
--with-xml=expat
--without-x
--disable-tests
--disable-verbose-mode
--disable-asserts
--disable-checks
make install
And the test program is:
client
gettimeofday() /* -> timer1 */
dbus_message_new_method_call()
dbus_message_append_args()
dbus_message_set_no_reply()
dbus_connection_send()
dbus_connection_flush()
gettimeofday() /* -> timer2 */
gettimeofday() /* -> timer3 */
dbus_message_new_method_call()
dbus_message_append_args()
dbus_connection_send_with_reply_and_block()
gettimeofday() /* -> timer4 */
server
dbus_filter()
{
gettimeofday() /* -> timer5 */
}
Results(data unit is "byte", time unit is "microsecond"):
input output timer1 timer2 timer3 timer4 timer5
---------------------------------------------------------------------------------------
0 0 0 2260 - - 1336
0 0 - - 0 462 1987
100 0 0 2741 - - 1701
100 0 - - 0 573 1991
100 100 0 2826 - - 1547
100 100 - - 0 462 3647
I'am glad to see it works much better. Nevertheless, I want it can
complete a synchronous remote call in several hundreds microseconds(at least
< 1500 microseconds). And it is more slower(about 1.3x) if I use the
bus-daemon.
I have noticed that D-Bus is designed to enable asynchronous
communication and avoid round trips, but I hope to use this useful message
bus system in my embeded system. In this system, there are synchronous
remote calls as many as asynchronous calls. That's why I care about the
performance of D-Bus greadtly.
[Attachment #5 (text/html)]
Many thanks for all these advices.<br><br>I did some more tests today. As Havoc's \
advice, I changed the code:<br> mode = \
DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED;<br>to<br> mode = \
DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY; <br>, then re-compile D-Bus \
V1.0.2 with:<br> ./configure \
--host=arm-linux<br> \
--with-xml=expat<br> \
--without-x<br> \
--disable-tests<br> \
--disable-verbose-mode<br> \
\
--disable-asserts<br> \
--disable-checks<br> make install<br><br>And the test program \
is:<br> client<br> \
gettimeofday() /* -> timer1 \
*/<br> \
dbus_message_new_method_call() \
<br> \
dbus_message_append_args()<br> \
dbus_message_set_no_reply()<br> \
dbus_connection_send()<br> \
dbus_connection_flush()<br> \
gettimeofday() /* -> timer2 */<br> \
<br> gettimeofday() /* -> \
timer3 */ <br> \
dbus_message_new_method_call()<br> \
dbus_message_append_args()<br> \
dbus_connection_send_with_reply_and_block()<br> \
gettimeofday() /* -> timer4 */<br> <br> \
server<br> dbus_filter() \
<br> \
{<br> \
gettimeofday() /* -> timer5 */<br> \
}<br><br>Results(data unit is "byte", time unit is \
"microsecond"):<br> input output \
timer1 timer2 timer3 timer4 timer5 \
<br>---------------------------------------------------------------------------------------<br> \
0 0 \
0 2260 \
- \
- 1336<br> \
0 \
0 \
- \
- \
0 462 \
1987 <br> 100 \
0 \
0 2741 \
- \
- \
1701<br> 100 \
0 \
- \
- \
0 573 \
1991<br> 100 \
100 0 \
2826 - \
- \
1547<br> 100 \
100 \
- \
- \
0 \
462 3647 <br><br> I'am glad \
to see it works much better. Nevertheless, I want it can complete a synchronous \
remote call in several hundreds microseconds(at least < 1500 microseconds). And it \
is more slower(about 1.3x) if I use the bus-daemon. <br><br> I have \
noticed that D-Bus is designed to enable asynchronous communication and avoid round \
trips, but I hope to use this useful message bus system in my embeded system. In this \
system, there are synchronous remote calls as many as asynchronous calls. That's \
why I care about the performance of D-Bus greadtly. <br><br>
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic