From: Moiz Raja Date: Fri, 20 Feb 2015 10:53:20 +0000 (-0800) Subject: BUG 2734 : Use the 95th percentile number to determine backpressure X-Git-Tag: release/lithium~531 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=6056a678a4409d4d43a0f44b8d0326d387bb81e2 BUG 2734 : Use the 95th percentile number to determine backpressure When running tests with OpenFlow I see the following transaction completion times consistently for 127 and 255 switches with statistics on. 50% - 5-6 ms 75% - 7-8 ms 95% - 20-60 ms 98% - 100-160 ms By using the 95th percentile number to determine transaction creation backpressure we can safely increase our throughput without causing timeouts due to outliers. Change-Id: I0d9739b3045afb389583f2dd18ac431215a28f84 Signed-off-by: Moiz Raja --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java index 4f472266c1..c51ea80726 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java @@ -342,7 +342,7 @@ public class ThreePhaseCommitCohortProxy implements DOMStoreThreePhaseCommitCoho timerContext.stop(); Snapshot timerSnapshot = commitTimer.getSnapshot(); - double allowedLatencyInNanos = timerSnapshot.get98thPercentile(); + double allowedLatencyInNanos = timerSnapshot.get95thPercentile(); long commitTimeoutInSeconds = actorContext.getDatastoreContext() .getShardTransactionCommitTimeoutInSeconds(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java index d2396e0524..b013515f25 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java @@ -71,7 +71,7 @@ public class ThreePhaseCommitCohortProxyTest extends AbstractActorTest { doReturn(commitTimer).when(actorContext).getOperationTimer("commit"); doReturn(commitTimerContext).when(commitTimer).time(); doReturn(commitSnapshot).when(commitTimer).getSnapshot(); - doReturn(TimeUnit.MILLISECONDS.toNanos(2000) * 1.0).when(commitSnapshot).get98thPercentile(); + doReturn(TimeUnit.MILLISECONDS.toNanos(2000) * 1.0).when(commitSnapshot).get95thPercentile(); doReturn(10.0).when(actorContext).getTxCreationLimit(); }