# ============================================================================= # settings.conf - every tunable value for the Apache kit, in one place # ============================================================================= # Both start-apache.sh and test-apache.sh read this file. # Edit a value here, then re-run ./start-apache.sh so Apache picks it up. # # Any value can also be overridden for a single run from the command line: # DURATION=30 ./test-apache.sh throughput # ============================================================================= # ----------------------------------------------------------------------------- # 1. Where Apache is reached # ----------------------------------------------------------------------------- # The test only talks to the local machine (no traffic leaves the host). # RHEL's default httpd.conf listens on port 80. Change APACHE_PORT only if # you also changed "Listen" in /etc/httpd/conf/httpd.conf. APACHE_HOST="${APACHE_HOST:-127.0.0.1}" APACHE_PORT="${APACHE_PORT:-80}" # ----------------------------------------------------------------------------- # 2. Files and folders used on the server # ----------------------------------------------------------------------------- # Test web pages are placed in a sub-folder of the normal RHEL web root, so # they get the correct SELinux label (httpd_sys_content_t) automatically. TEST_CONTENT_DIR="/var/www/html/perf-test" # Extra Apache settings for the test are written to this one drop-in file. # Delete it (or run "./start-apache.sh remove") to undo every change. DROPIN_CONF="/etc/httpd/conf.d/zz-perf-test.conf" # ----------------------------------------------------------------------------- # 3. Apache worker settings (event MPM, the RHEL 9 default) # ----------------------------------------------------------------------------- # Maximum clients served at the same time = SERVER_LIMIT x THREADS_PER_CHILD # and MAX_REQUEST_WORKERS must not be larger than that product. SERVER_LIMIT="${SERVER_LIMIT:-16}" # maximum child processes THREADS_PER_CHILD="${THREADS_PER_CHILD:-25}" # worker threads per child MAX_REQUEST_WORKERS="${MAX_REQUEST_WORKERS:-400}" # max simultaneous requests # For a fair benchmark every worker is started up front and kept running, # so results do not include the time Apache needs to create new processes. # (RHEL's default is to start 3 processes and grow only when busy.) START_SERVERS="${START_SERVERS:-16}" # child processes at startup MIN_SPARE_THREADS="${MIN_SPARE_THREADS:-75}" # idle threads to keep, at least MAX_SPARE_THREADS="${MAX_SPARE_THREADS:-400}" # idle threads to keep, at most KEEPALIVE_TIMEOUT="${KEEPALIVE_TIMEOUT:-5}" # seconds an idle connection stays open # 0 = unlimited requests per keep-alive connection. # With a limit, Apache closes busy connections part-way through a benchmark, # and ApacheBench (ab) then counts those closures as "failed requests". MAX_KEEPALIVE_REQUESTS="${MAX_KEEPALIVE_REQUESTS:-0}" # ----------------------------------------------------------------------------- # 4. How hard and how long each test runs # ----------------------------------------------------------------------------- DURATION="${DURATION:-10}" # seconds of load for each test run CONCURRENCY="${CONCURRENCY:-50}" # simultaneous clients for most tests CONCURRENCY_LEVELS="${CONCURRENCY_LEVELS:-1 10 50 100 200 400}" # "concurrency" test steps ERROR_TEST_CONCURRENCY="${ERROR_TEST_CONCURRENCY:-400}" # "errors" test (overload) STARTUP_ROUNDS="${STARTUP_ROUNDS:-3}" # restarts measured by the "startup" test # ----------------------------------------------------------------------------- # 5. Pass / fail targets # ----------------------------------------------------------------------------- # These are sensible starting points for a small RHEL 9 server serving static # files over localhost. Adjust them to your own hardware and service targets. # A result that misses its target is reported as FAIL; see # PERFORMANCE-METRICS.md for what each number means. TARGET_THROUGHPUT_MIN_RPS="${TARGET_THROUGHPUT_MIN_RPS:-2000}" # requests/second, at least TARGET_LATENCY_P95_MAX_MS="${TARGET_LATENCY_P95_MAX_MS:-50}" # 95% of requests faster than TARGET_LATENCY_P99_MAX_MS="${TARGET_LATENCY_P99_MAX_MS:-100}" # 99% of requests faster than TARGET_TRANSFER_MIN_MBPS="${TARGET_TRANSFER_MIN_MBPS:-100}" # MB/second, at least TARGET_ERROR_RATE_MAX_PCT="${TARGET_ERROR_RATE_MAX_PCT:-0.1}" # failed requests, at most % TARGET_SCALING_MIN_PCT="${TARGET_SCALING_MIN_PCT:-50}" # throughput kept at top level vs peak TARGET_MEMORY_MAX_MB="${TARGET_MEMORY_MAX_MB:-1024}" # peak Apache memory, at most TARGET_CPU_MAX_PCT="${TARGET_CPU_MAX_PCT:-90}" # share of all CPUs Apache may use TARGET_WORKERS_MAX_PCT="${TARGET_WORKERS_MAX_PCT:-90}" # busy workers vs MAX_REQUEST_WORKERS TARGET_STARTUP_MAX_MS="${TARGET_STARTUP_MAX_MS:-5000}" # start until first page served