messaging3: Add msg_sink/source -- perftest
commit4288c5496bcfa530066d5e8e4927472715b71465
authorVolker Lendecke <vl@samba.org>
Thu, 21 Aug 2014 14:32:07 +0000 (21 14:32 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 22 Aug 2014 22:24:18 +0000 (23 00:24 +0200)
tree7faed0b498e5ab5d9aef9d7e5d425d0bf53027cb
parentff9a083363b3749e0f9e346ea31e95c5e35e94ff
messaging3: Add msg_sink/source -- perftest

With this pair of programs I did some performance tests of the messaging
system. Guess what -- I found two bugs :-)

See the subsequent patches.

With 1500 msg_source processes I can generate message overload: A

Intel(R) Xeon(R) CPU           L5640  @ 2.27GHz

can receive roughly 100k messages per second. When using
messaging_read_send/recv user/system time is roughly even, a bit more
work done in user space. When using messaging_register, due to less
malloc activity, user space chews a lot less.

By the way: 1.500 helper threads in a blocking sendto() against a single
datagram socket reading as fast as it can (with epoll_wait in between)
only drove the loadavg to 12 on a 24-core machine. So I guess unix domain
datagram sockets are pretty well protected against overload. No thundering
herd or so. Interestingly "top" showed msg_sink at less than 90% CPU,
although it was clearly the bottleneck. But that must be a "top" artifact.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/msg_sink.c [new file with mode: 0644]
source3/torture/msg_source.c [new file with mode: 0644]
source3/wscript_build