Starting the kdbus discussions
Lukasz Skalski
l.skalski at partner.samsung.com
Fri Jan 17 09:06:24 PST 2014
On 01/17/2014 02:58 PM, Kay Sievers wrote:
> On Fri, Jan 17, 2014 at 2:27 PM, Lukasz Skalski
> <l.skalski at partner.samsung.com> wrote:
>> On 01/16/2014 06:28 PM, Lennart Poettering wrote:
>>>
>>> Anyway, if you care about performance measurements I certainly welcome
>>> any work on that!
>> As I mentioned yesterday I've prepared simple benchmark for my glib
>> port with native kdbus support. Below you can find results for first
>> working version (latest published patchset you can find here [1] -
>> below tests are based on not published yet new version my glib port
>> with support for protocol version 2).
>>
>> ===============
>> = Description =
>> ===============
>>
>> In order to perform tests of glib with kdbus native support I've
>> created two programs: gdbus_server and gdbus_client. The first of
>> them acts as a server, registers itself on the bus under well-known
>> name and waits for calls to its objects and methods. The second one
>> (client) makes calls and records periods of time between moment of
>> preparing of a call to the moment of receiving an answer.
>> The measurement is made by performing one thousand of calls and
>> computing a sum of duration of every call (for different sizes of
>> message payload: 4kB, 8kB, 16kB, 32kB, 64kB, 128kB, 256kB, 512kB
>> and 1MB). The client program returns total time of performed calls
>> after successful execution.
>>
>> Simple test applications you can find here [2]
>>
>> ===============
>> = Environment =
>> ===============
>>
>> Host: VirtualBox with Fedora 20 (3.12.5-302.fc20.x86_64)
>> All tests was performed in systemd-nspawn container (more info
>> here [3]).
>>
>> kdbus module: last commit 1ab20f6f5
>> systemd: last commit c4e6e2425 (systemd-nspawn container and host)
>> glib: last commit 8bc63b0ef (+kdbus patches for native support)
>>
>> ===========
>> = Results =
>> ===========
>>
>> (all results for PAYLOAD_VEC item)
>>
>> +--------------+--------------------+--------------------+
>> | | Elapsed time | Elapsed time |
>> | Message size | GLIB WITH KDBUS | GLIB + DBUS_DAEMON |
>> | | SUPPORT | |
>> +--------------+--------------------+--------------------+
>> | 1000 x 4kB | 1.351737 s | 1.870417 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 8kB | 1.349266 s | 1.857693 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 16kB | 1.383427 s | 2.219304 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 32kB | 1.358608 s | 2.542795 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 64kB | 1.878409 s | 3.062035 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 128kB | 2.265555 s | 4.043454 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 256kB | 3.112191 s | 6.657750 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 512kB | 3.383699 s | 11.400224 s |
>> +--------------+--------------------+--------------------+
>> | 1000 x 1MB | 4.703610 s | 19.041988 s |
>> +--------------+--------------------+--------------------+
> You see anyting interesting when you run the tests in:
> perf record ...
> And look at the results with:
> perf report
> ?
>
> Can you try the test below on the same box to have something to
> compare to the above numbers?
>
> $ ./test-bus-kernel-benchmark chart
> SIZE COPY MEMFD
> 1 34000 23970
> 2 39420 24110
> 4 38840 23290
> 8 38070 22970
> 16 37540 23350
> 32 39000 23690
> 64 39130 23910
> 128 39560 23880
> 256 39640 24060
> 512 39500 24120
> 1024 39520 24080
> 2048 39140 23900
> 4096 38600 24110
> 8192 37990 23020
> 16384 36700 21220
> 32768 34320 18950
> 65536 30280 15540
> 131072 24300 11260
> 262144 9390 7470
> 524288 4510 4380
> 1048576 2080 2330
> 2097152 910 1230
> 4194304 390 600
>
> (ThinkPad T430s, Fedora 20)
>
> Thanks,
> Kay
>
Result for my VirtualBox with Fedora 20
(test was run in systemd-nspawn container)
bash-4.2# ./test-bus-kernel-benchmark chart
SIZE COPY MEMFD
1 2620 1930
2 2480 1840
4 2430 1830
8 2390 1800
16 4510 2170
32 4520 2890
64 2480 1910
128 2410 1800
256 2360 1650
512 4950 2470
1024 2380 1900
2048 2430 1840
4096 2410 1860
8192 2280 1610
16384 4700 2460
32768 2380 2380
65536 3170 1780
131072 5170 2760
262144 3520 2470
524288 2420 2210
1048576 1190 1190
2097152 760 940
4194304 390 510
#
# PERF REPORTS
#
'TOP 20' for gdbus_client app (kdbus)
Samples: 77K of event 'cpu-clock', Event count (approx.): 19463750000
13.49% libc-2.18.so [.] memset
11.28% libglib-2.0.so.0.3903.0 [.] g_utf8_validate
10.57% [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore
10.43% libc-2.18.so [.] __memcpy_sse2_unaligned
6.55% [kernel.kallsyms] [k] acpi_pm_read
4.67% [kernel.kallsyms] [k] eventfd_write
2.48% libc-2.18.so [.] strlen
2.27% [kernel.kallsyms] [k] generic_exec_single
1.68% [kernel.kallsyms] [k] finish_task_switch
1.47% [kernel.kallsyms] [k] __do_page_fault
1.45% [kernel.kallsyms] [k] copy_user_generic_string
1.26% [kernel.kallsyms] [k] clear_page_c
0.92% libc-2.18.so [.] __strchrnul
0.89% [kernel.kallsyms] [k] flat_send_IPI_mask
0.83% libglib-2.0.so.0.3903.0 [.] g_mutex_get_impl
0.83% [kernel.kallsyms] [k] get_page_from_freelist
0.74% libglib-2.0.so.0.3903.0 [.] g_slice_free1
0.74% libc-2.18.so [.] __GI___strcmp_ssse3
0.70% libc-2.18.so [.] __strchr_sse2
0.69% libglib-2.0.so.0.3903.0 [.] g_private_get_impl
'TOP 20' for gdbus_client app (dbus-daemon)
Samples: 88K of event 'cpu-clock', Event count (approx.): 22152500000
28.77% libglib-2.0.so.0.3903.0 [.] g_utf8_validate
10.16% libc-2.18.so [.] memset
7.59% [kernel.kallsyms] [k] acpi_pm_read
5.67% libc-2.18.so [.] strlen
4.62% [kernel.kallsyms] [k] eventfd_write
4.60% libc-2.18.so [.] __memcpy_sse2_unaligned
4.32% [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore
2.68% [kernel.kallsyms] [k] copy_user_generic_string
1.61% [kernel.kallsyms] [k] finish_task_switch
1.27% libc-2.18.so [.] __GI___strcmp_ssse3
1.17% libglib-2.0.so.0.3903.0 [.] g_slice_free1
1.15% libglib-2.0.so.0.3903.0 [.] g_mutex_get_impl
1.07% libc-2.18.so [.] __strchr_sse2
0.76% libglib-2.0.so.0.3903.0 [.] g_private_get_impl
0.65% libpthread-2.18.so [.] pthread_mutex_lock
0.65% libc-2.18.so [.] _int_malloc
0.53% [kernel.kallsyms] [k] generic_exec_single
0.49% libc-2.18.so [.] _int_free
0.41% libpthread-2.18.so [.] pthread_mutex_unlock
0.39% [kernel.kallsyms] [k] fget_light
0.38% libglib-2.0.so.0.3903.0 [.] g_slice_alloc
--
Lukasz Skalski
Samsung R&D Institute Poland
Samsung Electronics
l.skalski at partner.samsung.com
More information about the dbus
mailing list