# ============================================================================= # settings.conf - every tunable value for the FTP kit, in one place # ============================================================================= # Both start-ftp.sh and test-ftp.sh read this file. # After changing a value in sections 1-4, run ./start-ftp.sh again so the # FTP server picks it up. # # Any value can also be overridden for a single run from the command line: # DURATION=30 ./test-ftp.sh download # ============================================================================= # ----------------------------------------------------------------------------- # 1. Where the test FTP server listens # ----------------------------------------------------------------------------- # The test server listens ONLY on the loopback address, so it cannot be # reached from the network and no firewall change is needed. It uses port # 2121, so it does not clash with a normal FTP server on port 21. FTP_ADDRESS="${FTP_ADDRESS:-127.0.0.1}" FTP_PORT="${FTP_PORT:-2121}" # Ports for passive-mode data connections (every file transfer and every # directory listing opens one). The SELinux policy lets vsftpd use these # ports, and no other service owns a port in this range. PASV_MIN_PORT="${PASV_MIN_PORT:-55000}" PASV_MAX_PORT="${PASV_MAX_PORT:-56999}" # ----------------------------------------------------------------------------- # 2. Files, user and service used on the server # ----------------------------------------------------------------------------- # The kit does NOT touch the normal vsftpd.service or /etc/vsftpd/vsftpd.conf. # It runs the same RHEL vsftpd program as its own systemd service, with its # own configuration, login rules and data folder. # "./start-ftp.sh cleanup" removes all of it. TEST_SERVICE="vsftpd-perf-test" # systemd service name TEST_UNIT_FILE="/etc/systemd/system/${TEST_SERVICE}.service" TEST_CONF="/etc/vsftpd/perf-test.conf" # vsftpd configuration TEST_PAM_FILE="/etc/pam.d/${TEST_SERVICE}" # login (PAM) rules TEST_USER_LIST="/etc/vsftpd/perf-test.user_list" # users allowed to log in TEST_PASSWORD_FILE="/etc/vsftpd/perf-test.password" # test user's password (root only) TEST_STATE_FILE="/etc/vsftpd/perf-test.state" # remembers what to undo TEST_LOG="/var/log/vsftpd-perf-test.log" # transfer log (xferlog) TEST_PIDFILE="/run/${TEST_SERVICE}.pid" # used only without systemd # The test user. It can log in ONLY to the test FTP server: its shell is # /sbin/nologin, and the normal vsftpd PAM rules refuse such users. TEST_USER="ftpperf" # The test user's FTP folder. Clients see it as "/": # /download/big.bin one big file (download test) # /download/small/file-*.bin many small files (small-file and listing tests) # /upload/ the only folder clients may write to FTP_ROOT="/var/ftp/perf-test" # ----------------------------------------------------------------------------- # 3. vsftpd settings # ----------------------------------------------------------------------------- # Most options keep the RHEL default. These are the ones that matter for # performance (see section 7 of PERFORMANCE-METRICS.md). MAX_CLIENTS="${MAX_CLIENTS:-2000}" # sessions at the same time (RHEL default 2000) # YES = every session gets its own private network stack (safer, RHEL # default). Creating one costs time at every login; NO makes logins faster. ISOLATE_NETWORK="${ISOLATE_NETWORK:-YES}" # YES = look up the client's host name in DNS at every login (RHEL default). # On an offline network without a reachable DNS server this can make each # login wait for a DNS timeout. REVERSE_LOOKUP="${REVERSE_LOOKUP:-YES}" XFERLOG_ENABLE="${XFERLOG_ENABLE:-YES}" # log every transfer (RHEL default: YES) # ----------------------------------------------------------------------------- # 4. Test files (created by start-ftp.sh) # ----------------------------------------------------------------------------- BIG_FILE_MB="${BIG_FILE_MB:-256}" # size of download/big.bin SMALL_FILE_KB="${SMALL_FILE_KB:-4}" # size of each small file SMALL_FILE_COUNT="${SMALL_FILE_COUNT:-1000}" # small files (= entries in the listed folder) UPLOAD_FILE_MB="${UPLOAD_FILE_MB:-256}" # size of each file sent by the upload test # ----------------------------------------------------------------------------- # 5. How hard and how long each test runs # ----------------------------------------------------------------------------- DURATION="${DURATION:-10}" # seconds of load for each test run # "login", "smallfiles", "listing": this many clients work at the same time, # each starts again as soon as it is done (full speed). WORKERS="${WORKERS:-16}" # "latency", "errors", "cpu": a steady, realistic load of LOAD_RATE new # sessions per second. Each session connects, logs in, downloads one small # file and quits. LOAD_RATE="${LOAD_RATE:-100}" # "download", "upload": parallel streams (1 = the speed one client gets). TRANSFER_STREAMS="${TRANSFER_STREAMS:-1}" # "concurrency": sessions downloading at the same time, step by step. CONCURRENCY_LEVELS="${CONCURRENCY_LEVELS:-1 10 50 100 200 400}" # "memory": idle logged-in sessions held open while memory is measured. MEMORY_SESSIONS="${MEMORY_SESSIONS:-200}" OPERATION_TIMEOUT="${OPERATION_TIMEOUT:-10}" # seconds to wait for an answer before "failed" STARTUP_ROUNDS="${STARTUP_ROUNDS:-3}" # restarts measured by the "startup" test # Processes used by the load generator. "auto" = a quarter of the CPU cores # (at most 8), so most cores are left for the FTP server. GENERATOR_PROCESSES="${GENERATOR_PROCESSES:-auto}" # ----------------------------------------------------------------------------- # 6. Pass / fail targets # ----------------------------------------------------------------------------- # Sensible starting points for a RHEL 9 file server with a few hundred # users. 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:-2000}" # start until first greeting TARGET_LOGIN_MIN_PER_S="${TARGET_LOGIN_MIN_PER_S:-100}" # logins/second, at least TARGET_LATENCY_P95_MAX_MS="${TARGET_LATENCY_P95_MAX_MS:-100}" # 95% of sessions faster than TARGET_LATENCY_P99_MAX_MS="${TARGET_LATENCY_P99_MAX_MS:-250}" # 99% of sessions faster than TARGET_ERRORS_MAX_PCT="${TARGET_ERRORS_MAX_PCT:-0.1}" # failed sessions, at most % TARGET_DOWNLOAD_MIN_MBPS="${TARGET_DOWNLOAD_MIN_MBPS:-100}" # MB/s, at least TARGET_UPLOAD_MIN_MBPS="${TARGET_UPLOAD_MIN_MBPS:-50}" # MB/s, at least TARGET_SMALLFILES_MIN_PER_S="${TARGET_SMALLFILES_MIN_PER_S:-500}" # small downloads/second TARGET_LISTING_MIN_PER_S="${TARGET_LISTING_MIN_PER_S:-100}" # folder listings/second TARGET_CONCURRENCY_MIN="${TARGET_CONCURRENCY_MIN:-200}" # sessions without errors TARGET_CPU_MAX_MS_PER_SESSION="${TARGET_CPU_MAX_MS_PER_SESSION:-20}" # CPU ms per session (1 core = 50 sessions/s) TARGET_MEMORY_MAX_MB_PER_SESSION="${TARGET_MEMORY_MAX_MB_PER_SESSION:-4}" # MB per idle session