Control on DBus-daemon virtual memory usage ballooning

Hailun Tan dearambermini at gmail.com
Mon Sep 7 06:17:29 UTC 2020


I am currently trying  the D-Bus sample codes from the following link:

https://linoxide.com/how-tos/d-bus-ipc-mechanism-linux/

It  worked.

Then I performed the exhaustion tests on the sample code above i.e.,
broadcast the DBus messages rapidly to other DBus users, who did not handle
the received message as quick as the sender sent them, the D-Bus
daemon's virtual memory usage started to grow, which  is expected as DBus
daemon's outgoing queue accumulated.

Then I stopped the sender process, the D-Bus daemon's virtual memory usage
should start to shrink as the receiver is disseminating the message with
the filter function. However, the D-Bus daemon's virtual memory usage did
not shrink down even after the receiver process completed disseminating all
the data.

I have tried the above tests for  the following three cases:

1. sender application broadcasted the messages to all receiver applications
via DBus.
2. sender application sent the method call messages to a
particular receiver application, without requesting a reply
3.  sender application sent the method call messages to a
particular receiver application, requesting a reply from receiver
application.

case 1 and 2 will make the dbus daemon virtual memory usage enlarge and its
virtual memory usage would not shrink if the sender application were
terminated and the receiver application completed the handlings of all
messages from sender.

Case 3, however, would not have the DBus daemon VM usage grown. The VM
usage remained unchanged during the test.

So my question is, how to make the case 1 and 2 behave as case 3? Or
alternatively,  even though the VM usage grew due to the message queues in
DBus daemon,  its VM usage should shrink down to its original state when
the system was up?

I doubted that DBus daemon should have some configurations to set so that
it can release these memory usage after the receiver application completed
handling these messages. I have spent quite a while looking for such a
configuration in the DBus daemon config file (for session bus) in the
following link:

https://dbus.freedesktop.org/doc/dbus-daemon.1.html

But I cannot find  any. So Please advise how I can make dbus daemon to
release these VM usages after the messages have been handled?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20200907/f228c62a/attachment.htm>


More information about the dbus mailing list