# ============================================================================= # settings.conf - every tunable value for the DNS kit, in one place # ============================================================================= # Both start-dns.sh and test-dns.sh read this file. # Edit a value here, then re-run ./start-dns.sh so BIND picks it up. # # Any value can also be overridden for a single run from the command line: # DURATION=30 ./test-dns.sh throughput # ============================================================================= # ----------------------------------------------------------------------------- # 1. Where the DNS server is reached # ----------------------------------------------------------------------------- # All test traffic stays on this machine (loopback). No traffic leaves the host. DNS_SERVER="${DNS_SERVER:-127.0.0.1}" DNS_PORT="${DNS_PORT:-53}" # BIND's built-in statistics web page (JSON). The test reads server-side # counters from it: queries received, cache hits, cache memory ... # Port 8953 is used because SELinux on RHEL already allows named to use it # (port type rndc_port_t), so no SELinux change is needed. STATS_PORT="${STATS_PORT:-8953}" # ----------------------------------------------------------------------------- # 2. Files and folders used on the server # ----------------------------------------------------------------------------- # The kit never edits /etc/named.conf. It writes its own configuration file # and tells named.service to use it, through one systemd drop-in file. # "./start-dns.sh cleanup" removes all of these again. TEST_CONF="/etc/named/perf-test.conf" TSIG_KEY_FILE="/etc/named/perf-test-upstream.key" ZONE_DIR="/var/named/perf-test" SYSTEMD_DROPIN="/etc/systemd/system/named.service.d/zz-perf-test.conf" # Test zone names. The ".test" top-level domain is reserved for testing # (RFC 6761), so these names can never clash with real internet names. TEST_ZONE="perf.test" # authoritative zone, answered by this server UPSTREAM_ZONE="upstream.test" # zone reached through forwarding (cache test) # ----------------------------------------------------------------------------- # 3. BIND (named) settings # ----------------------------------------------------------------------------- # Number of host records in the test zone (host1 ... hostN). A bigger zone # makes startup and zone-transfer (AXFR) tests more realistic. ZONE_RECORDS="${ZONE_RECORDS:-100000}" # Worker threads of named. Empty = BIND's default (one per CPU core). NAMED_THREADS="${NAMED_THREADS:-}" # Largest amount of memory the answer cache may use (BIND syntax: # "256m", "2g", or a share of RAM like "90%", which is BIND's own default). MAX_CACHE_SIZE="${MAX_CACHE_SIZE:-90%}" RECURSIVE_CLIENTS="${RECURSIVE_CLIENTS:-1000}" # parallel recursive lookups allowed TCP_CLIENTS="${TCP_CLIENTS:-1000}" # parallel TCP connections allowed (BIND default: 150) # ----------------------------------------------------------------------------- # 4. How hard and how long each test runs # ----------------------------------------------------------------------------- DURATION="${DURATION:-10}" # seconds of load for each test run # "Outstanding queries" = queries sent but not yet answered, at one moment. # It is the DNS version of "number of simultaneous clients". OUTSTANDING="${OUTSTANDING:-100}" OUTSTANDING_LEVELS="${OUTSTANDING_LEVELS:-1 10 50 100 200 500 1000}" # "concurrency" test steps # Fixed query rates (queries per second) for the tests that need a steady load. LATENCY_TEST_QPS="${LATENCY_TEST_QPS:-10000}" # "latency": normal, steady traffic LOSS_TEST_QPS="${LOSS_TEST_QPS:-50000}" # "loss": your expected peak (or higher) QUERY_TIMEOUT="${QUERY_TIMEOUT:-2}" # seconds without answer = query lost STARTUP_ROUNDS="${STARTUP_ROUNDS:-3}" # restarts measured by the "startup" test AXFR_ROUNDS="${AXFR_ROUNDS:-3}" # zone transfers measured by the "axfr" test CACHE_TEST_NAMES="${CACHE_TEST_NAMES:-50000}" # different names looked up in the "cache" test # Worker processes of the load generator (lib/dnsload.py). Each one uses up # to one CPU core and can send about 100,000 queries per second. # Default: a quarter of the CPU cores (1 to 8), so named keeps most of the CPUs. DEFAULT_LOAD_PROCESSES=$(( $(nproc) / 4 )) (( DEFAULT_LOAD_PROCESSES < 1 )) && DEFAULT_LOAD_PROCESSES=1 (( DEFAULT_LOAD_PROCESSES > 8 )) && DEFAULT_LOAD_PROCESSES=8 LOAD_PROCESSES="${LOAD_PROCESSES:-$DEFAULT_LOAD_PROCESSES}" # ----------------------------------------------------------------------------- # 5. Pass / fail targets # ----------------------------------------------------------------------------- # Sensible starting points for a small RHEL 9 DNS server tested over # localhost. Adjust them to your own hardware and service requirements. # A result that misses its target is reported as FAIL; see # PERFORMANCE-METRICS.md for what each number means. TARGET_STARTUP_MAX_MS="${TARGET_STARTUP_MAX_MS:-10000}" # start until first answer TARGET_THROUGHPUT_MIN_QPS="${TARGET_THROUGHPUT_MIN_QPS:-20000}" # queries/second, at least TARGET_LATENCY_P95_MAX_MS="${TARGET_LATENCY_P95_MAX_MS:-2}" # 95% of answers faster than TARGET_LATENCY_P99_MAX_MS="${TARGET_LATENCY_P99_MAX_MS:-5}" # 99% of answers faster than TARGET_SCALING_MIN_PCT="${TARGET_SCALING_MIN_PCT:-50}" # throughput kept at top level vs peak TARGET_LOSS_MAX_PCT="${TARGET_LOSS_MAX_PCT:-0.1}" # lost + failed queries, at most % TARGET_TCP_MIN_QPS="${TARGET_TCP_MIN_QPS:-2000}" # TCP, new connection per query TARGET_CACHE_HIT_P95_MAX_MS="${TARGET_CACHE_HIT_P95_MAX_MS:-2}" # answers from cache, p95 TARGET_AXFR_MAX_S="${TARGET_AXFR_MAX_S:-10}" # full zone transfer, at most TARGET_CPU_MAX_PCT="${TARGET_CPU_MAX_PCT:-90}" # share of all CPUs named may use TARGET_MEMORY_MAX_MB="${TARGET_MEMORY_MAX_MB:-2048}" # peak named memory, at most