From 2cfc517874e98c5780c1b1b4c38440a8123f86f6 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 16 Jul 2021 18:34:12 +0300 Subject: [PATCH] main, test: adjust number of networking iocbs Seastar's default limit of 10,000 iocbs per shard is too low for some workload (it places an upper bound on the number of idle connections, above which a crash occurs). Use the new Seastar feature to raise the default to 50000. Also multiply the global reservation by 5, and round it upwards so the number is less weird. This prevents io_setup() from failing. For tests, the reservation is reduced since they don't create large numbers of connections. This reduces surprise test failures when they are run on machines that haven't been adjusted. Fixes #9051 Closes #9052 --- dist/common/sysctl.d/99-scylla-aio.conf | 2 +- main.cc | 1 + test.py | 3 ++- test/cql-pytest/run.py | 1 + test/redis/run | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/common/sysctl.d/99-scylla-aio.conf b/dist/common/sysctl.d/99-scylla-aio.conf index 35957da55a27..778c1f89998e 100644 --- a/dist/common/sysctl.d/99-scylla-aio.conf +++ b/dist/common/sysctl.d/99-scylla-aio.conf @@ -1,2 +1,2 @@ # Raise max AIO events -fs.aio-max-nr = 5578536 +fs.aio-max-nr = 30000000 diff --git a/main.cc b/main.cc index 04757e9b8435..63e6bd5a2fc5 100644 --- a/main.cc +++ b/main.cc @@ -438,6 +438,7 @@ int main(int ac, char** av) { app_cfg.name = "Scylla"; app_cfg.default_task_quota = 500us; app_cfg.auto_handle_sigint_sigterm = false; + app_cfg.max_networking_aio_io_control_blocks = 50000; app_template app(std::move(app_cfg)); auto ext = std::make_shared(); diff --git a/test.py b/test.py index 787b23566962..dc38c7ad17a5 100755 --- a/test.py +++ b/test.py @@ -292,7 +292,8 @@ def check_log(self, trim): class UnitTest(Test): - standard_args = shlex.split("--overprovisioned --unsafe-bypass-fsync 1 --kernel-page-cache 1 --blocked-reactor-notify-ms 2000000 --collectd 0") + standard_args = shlex.split("--overprovisioned --unsafe-bypass-fsync 1 --kernel-page-cache 1 --blocked-reactor-notify-ms 2000000 --collectd 0" + " --max-networking-io-control-blocks=100") def __init__(self, test_no, shortname, args, suite, mode, options): super().__init__(test_no, shortname, suite, mode, options) diff --git a/test/cql-pytest/run.py b/test/cql-pytest/run.py index 8924d88d9a16..76433adf8e19 100755 --- a/test/cql-pytest/run.py +++ b/test/cql-pytest/run.py @@ -185,6 +185,7 @@ def run_scylla_cmd(pid, dir): '--smp', '2', '-m', '1G', '--overprovisioned', + '--max-networking-io-control-blocks', '100', '--unsafe-bypass-fsync', '1', '--kernel-page-cache', '1', '--api-address', ip, diff --git a/test/redis/run b/test/redis/run index 2c6cedf07762..661dd2139d4c 100755 --- a/test/redis/run +++ b/test/redis/run @@ -70,6 +70,7 @@ ln -s "$SCYLLA" "$SCYLLA_LINK" --ring-delay-ms 0 --collectd 0 \ --smp 2 -m 1G \ --overprovisioned --unsafe-bypass-fsync 1 --kernel-page-cache 1 \ + --max-networking-io-control-blocks 100 \ --api-address $SCYLLA_IP \ --rpc-address $SCYLLA_IP \ --listen-address $SCYLLA_IP \