Tune NotificationRouter wait strategy 47/17347/1
authorRobert Varga <rovarga@cisco.com>
Mon, 30 Mar 2015 13:59:54 +0000 (15:59 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 30 Mar 2015 13:59:54 +0000 (15:59 +0200)
commitf4595138eb29ec95958d9d55b95cc716b2fd692e
treece53705ed40ba945c42fd92977f8bd2101e7df21
parenta681e6bec3bbd7b536302ee9e083ae04b7f5ebdd
Tune NotificationRouter wait strategy

CPU traces show we are seeing NotificationRouter spin for more work even
when there are no notifications being generated. Change the strategy so
we end up block the thread after a period of spinning/yielding. The
default spin period is set to 1ms, followed by 30ms of yielding,
followed by a block.

This should provide reasonable throughput on notification-heavy
workloads as well as not waste a lot of CPU when there are no
notifications.

Change-Id: Ia1de5ff2616392609a0868b9b8ba3bce15baa105
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouter.java