[systemd-devel] [PATCH 0/4] kdbus: improve benchmark by using cached metadata

Djalal Harouni tixxdz at opendz.org
Fri Jun 27 03:32:04 PDT 2014


Hi,

First this is just to investigate things! and if it follows kdbus use
cases. This is in the spirit of the late kdbus benchmark threads.
Do not apply, just trying to investigate things and if it is really
useful.

I did benchmarks and the improvement is say ~50%, but did not post
numbers, sorry currently I only have kvm guests under hand!

After applying the patches, give test-kdbus-benchmark a try (really
sorry).


Collecting metadata for kdbus is a heavy operation, in the other hand it
is very useful and part of kdbus design.

To reduce calls to kdbus_meta_append() and the metadata collection
overhead, introduce the KDBUS_HELLO_CACHE_META flag that will only be
available to privileged bus users.

This flag will permit source connections to use the already cached
metadata from the handle or from HELLO instead of collecting the
metadata on each send operation. This improves benchmark tests by ~50%.

This will be available only to privileged bus users, in other words bus
owners. Applications that do not trust the bus owner should not connect
to that bus, bus owners are able to monitor to set policies and even
impersonate somebody else they can provide custom credential data.


This will have dramatic performance improvements on cases where
you have a privileged connection that performs broadcast, other
unprivileged connections are interested on metadata but will not cause
the source connection to collect its data on every send/broadcast round.

Use cases where you a privileged process that will setup its environment
then opens the bus in order to serve multiple connections and perform
broadcasting will benefit from this. It allows to provide metadata and
reduce latency.


Things to investigate is:
Is this really useful
Security
Add tests


Thanks!


More information about the systemd-devel mailing list