From 6b110676902d13102903b5e3d4336624b194cd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 1 Jul 2019 17:26:17 +0300 Subject: [PATCH] Lower throttling limit in mxs173_throttle_filter The test appears to fail when the throttling is unable to keep the QPS high enough for the test to pass. To reduce the likelihood of this, lower the limit to 500 QPS. In theory, the minimum delay of one millisecond in the delayed_call limits the filter to a maximum QPS of 1000 as each query would wait for at least a millisecond before being routed. This is yet to be proven but it would explain why the tests are having a hard time approaching that level of QPS. --- .../cnf/maxscale.cnf.template.mxs173_throttle_filter | 2 +- maxscale-system-test/mxs173_throttle_filter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mxs173_throttle_filter b/maxscale-system-test/cnf/maxscale.cnf.template.mxs173_throttle_filter index 0ac5943e0..8903c666c 100644 --- a/maxscale-system-test/cnf/maxscale.cnf.template.mxs173_throttle_filter +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mxs173_throttle_filter @@ -56,7 +56,7 @@ port = 4009 [throttle] type = filter module = throttlefilter -max_qps = 1000 +max_qps = 500 throttling_duration = 10000 sampling_duration = 250 continuous_duration = 2000 diff --git a/maxscale-system-test/mxs173_throttle_filter.cpp b/maxscale-system-test/mxs173_throttle_filter.cpp index 1ce5dfd1b..6215b0be7 100644 --- a/maxscale-system-test/mxs173_throttle_filter.cpp +++ b/maxscale-system-test/mxs173_throttle_filter.cpp @@ -15,7 +15,7 @@ DEFINE_EXCEPTION(Whoopsy); // TODO these should be read from maxscale.cnf. Maybe the test-lib should replace // any "###ENV_VAR###", with environment variables so that code and conf can share. -constexpr int max_qps = 1000; +constexpr int max_qps = 500; constexpr float throttling_duration = 10000 / 1000.0; constexpr float sampling_duration = 250 / 1000.0; constexpr float continuous_duration = 2000 / 1000.0;