# ============================================================================= # settings.conf - every tunable value for the DHCP kit, in one place # ============================================================================= # Both start-dhcp.sh and test-dhcp.sh read this file. # After changing a value in sections 1-3, run ./start-dhcp.sh again so the # DHCP server picks it up. # # Any value can also be overridden for a single run from the command line: # DURATION=30 ./test-dhcp.sh throughput # ============================================================================= # ----------------------------------------------------------------------------- # 1. The private test network # ----------------------------------------------------------------------------- # The test never uses a real network card. start-dhcp.sh creates a virtual # cable (a "veth pair") with two ends: # # DHCP server (dhcpd) simulated DHCP clients # [ SERVER_IFACE 10.199.0.1 ] <=========> [ CLIENT_IFACE ] # normal host network inside network namespace TEST_NETNS # # dhcpd listens ONLY on SERVER_IFACE, so it can never answer clients on the # real network. Pick a subnet that is not used anywhere on your network. TEST_NETNS="${TEST_NETNS:-dhcp-perf}" # network namespace for the clients SERVER_IFACE="${SERVER_IFACE:-dhcp-srv}" # server end of the virtual cable (max 15 chars) CLIENT_IFACE="${CLIENT_IFACE:-dhcp-cli}" # client end of the virtual cable (max 15 chars) SUBNET="${SUBNET:-10.199.0.0}" NETMASK="${NETMASK:-255.255.0.0}" PREFIX_LENGTH="${PREFIX_LENGTH:-16}" # the same netmask, written as /16 SERVER_IP="${SERVER_IP:-10.199.0.1}" CLIENT_IP="${CLIENT_IP:-10.199.0.2}" # used only as the sender address # Addresses the server hands out: 32766 addresses. POOL_START="${POOL_START:-10.199.128.1}" POOL_END="${POOL_END:-10.199.255.254}" # ----------------------------------------------------------------------------- # 2. Files and service used on the server # ----------------------------------------------------------------------------- # The kit does NOT touch the normal dhcpd.service or /etc/dhcp/dhcpd.conf. # It runs the same RHEL dhcpd program as its own systemd service, with its # own configuration and lease file. "./start-dhcp.sh cleanup" removes them. TEST_SERVICE="dhcpd-perf-test" # systemd service name TEST_UNIT_FILE="/etc/systemd/system/${TEST_SERVICE}.service" TEST_CONF="/etc/dhcp/dhcpd-perf-test.conf" # dhcpd configuration TEST_LEASES="/var/lib/dhcpd/dhcpd-perf-test.leases" # dhcpd lease database TEST_PIDFILE="/run/dhcpd-perf-test.pid" # used only without systemd # ----------------------------------------------------------------------------- # 3. dhcpd settings # ----------------------------------------------------------------------------- LEASE_TIME="${LEASE_TIME:-3600}" # seconds a lease is valid (default) MAX_LEASE_TIME="${MAX_LEASE_TIME:-7200}" # longest lease a client may ask for # ----------------------------------------------------------------------------- # 4. How hard and how long each test runs # ----------------------------------------------------------------------------- DURATION="${DURATION:-10}" # seconds of load for each test run # "throughput": this many clients are in the middle of getting a lease at # any moment. Each starts again as soon as it has its lease (maximum speed). OUTSTANDING="${OUTSTANDING:-50}" # "latency", "loss", "cpu", "memory", "leasedb": a steady, realistic load of # LOAD_RATE new clients per second. LOAD_RATE="${LOAD_RATE:-200}" # "scaling": the steady load is raised step by step through these rates. RATE_LEVELS="${RATE_LEVELS:-250 500 1000 2000 4000 8000 16000}" SCALING_LOSS_LIMIT_PCT="${SCALING_LOSS_LIMIT_PCT:-1}" # a step "keeps up" if loss <= this # "renew": this many clients get a lease, then renew it again and again. RENEW_CLIENTS="${RENEW_CLIENTS:-1000}" # Different simulated clients (MAC addresses) to cycle through. Must be # smaller than the address pool (32766), so the pool never runs out. MAC_POOL_SIZE="${MAC_POOL_SIZE:-20000}" # Every test run adds records to the lease file (a full run: about 140 MB). # "yes" empties the test lease file at the start of each run, so every run # starts from the same point and results can be compared. RESET_LEASES_BEFORE_TEST="${RESET_LEASES_BEFORE_TEST:-yes}" EXCHANGE_TIMEOUT="${EXCHANGE_TIMEOUT:-2}" # seconds to wait for an answer before "lost" STARTUP_ROUNDS="${STARTUP_ROUNDS:-3}" # restarts measured by the "startup" test # ----------------------------------------------------------------------------- # 5. Pass / fail targets # ----------------------------------------------------------------------------- # These are sensible starting points for a RHEL 9 server that serves a # network of a few thousand clients. Adjust them to your own needs. 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:-3000}" # start until first OFFER TARGET_THROUGHPUT_MIN_LPS="${TARGET_THROUGHPUT_MIN_LPS:-1000}" # new leases/second, at least TARGET_LATENCY_P95_MAX_MS="${TARGET_LATENCY_P95_MAX_MS:-10}" # 95% of lease exchanges faster than TARGET_LATENCY_P99_MAX_MS="${TARGET_LATENCY_P99_MAX_MS:-50}" # 99% of lease exchanges faster than TARGET_LOSS_MAX_PCT="${TARGET_LOSS_MAX_PCT:-0.1}" # failed exchanges at LOAD_RATE, at most % TARGET_CAPACITY_MIN_LPS="${TARGET_CAPACITY_MIN_LPS:-1000}" # highest rate kept up with, at least TARGET_RENEW_MIN_RPS="${TARGET_RENEW_MIN_RPS:-1000}" # renewals/second, at least TARGET_CPU_MAX_PCT="${TARGET_CPU_MAX_PCT:-50}" # % of ONE core at LOAD_RATE TARGET_MEMORY_MAX_MB="${TARGET_MEMORY_MAX_MB:-256}" # dhcpd memory, at most