What dbus performance issue might prevent it from embedded system?

From my testimony, dbus performance should be twice as slow as other ipc messaging mechanisms due to the existence of the daemon.

In a discussion of the issue that uses IPC Linux technology , some of them mention performance issues. Do you see performance issues other than the slower factor? Do you see a problem that prevents the use of dbus in the embedded system?

As far as I understand, if dbus is intended for small messages. If you need to transfer a large amount of data, one solution is to put the data in a shared memory or heap, and then use dbus for notification. Other ipc mechanisms in accordance with the discussion under discussion: Signals, Anonymous pipes, Named pipes or FIFOs, SysV message queues, POSIX message queues, SysV shared memory, POSIX shared memory, SysV semaphores, POSIX semaphores, FUTEX locks, backup and anonymous shared memory using mmap, UNIX sockets, Netlink sockets, network sockets, Inotify mechanisms, FUSE subsystem, D-Bus subsystem.

I should mention another question that lists the requirements (although it is centered on apah):

  • packet / message oriented
  • ability to handle point-to-point and one-to-many messages
  • no hierarchy, no server and client
  • if one endpoint fails, others must be notified
  • good support for existing Linux distributions
  • the existence of a "binding" for Apache to create dynamic pages is too specific, but it can be ignored in the general discussion of using built-in dbus

However, another performance issue mentions performance improvement methods. Given all this, I think that when using dbus in the embedded system there should be less problems or disadvantages.

+7
performance embedded ipc dbus
Aug 01 '14 at 17:39
source share
2 answers

I do not think that there is a problem with real and great performance.

Profiling:

  • On a processor with a 200 MHz arm926ejs processor, calling and answering a method with two arguments uint32 consumes from 0 to 15 ms. average value of 6 ms.

  • Changed the 2nd parameter to an array of 1000 bytes. If you use the api iteration to pack and unpack the second parameter, it takes about 18 ms.

  • The same 2nd array parameter of 1000 bytes. Using a fixed-length api to pack and unpack the second parameter will take about 8 ms.

  • For comparison, use SysV msgq, passing the message to another process and receiving a response. This is also about 10 ms, although without optimizing the code and repeating the test for a large number of samples.

Thus, profiling does not show performance problems.

To support this conclusion, there is a performance page on the dbus page that indicates only double context switching, since with dbus it needs to send a message to the daemon and then to the destination.

Edit: if you send messages directly bypassing the daemon , performance doubles.

+4
Aug 14 '14 at 17:53
source share

Well, the Genivi Automotive -oriented Alliance has implemented and supports CommonAPI , which runs on top of DBUS, as an IPC mechanism for car head units.

+3
Apr 20 '15 at 13:42
source share



All Articles