# ============================================================================= # settings.conf - every tunable value for the NFS kit, in one place # ============================================================================= # Both start-nfs.sh and test-nfs.sh read this file. # After changing a value in sections 1-3, run ./start-nfs.sh again so the # NFS server and the test mount pick it up. # # Any value can also be overridden for a single run from the command line: # DURATION=30 ./test-nfs.sh seqread # ============================================================================= # ----------------------------------------------------------------------------- # 1. The test export (server side) # ----------------------------------------------------------------------------- # The kit uses RHEL's normal kernel NFS server (nfs-server.service); Linux # has only one. It ADDS one export, in its own file, and changes no other # export. The export is allowed ONLY for 127.0.0.1, so no other machine can # mount it and no firewall change is needed. # "./start-nfs.sh cleanup" removes everything the kit created. EXPORT_DIR="${EXPORT_DIR:-/srv/nfs-perf-test}" # folder that is shared (exported) EXPORT_CLIENT="127.0.0.1" # the only client allowed to mount it # Export options (man 5 exports). "sync" is the RHEL default and the safe # choice: the server writes data to disk before it says "done". # "async" is much faster for writes, but data can be lost if the server # crashes (see PERFORMANCE-METRICS.md, section 7). EXPORT_OPTIONS="${EXPORT_OPTIONS:-rw,sync,root_squash,no_subtree_check}" TEST_EXPORTS_FILE="/etc/exports.d/nfs-perf-test.exports" # our export line TEST_NFS_CONF="/etc/nfs.conf.d/nfs-perf-test.conf" # our server settings TEST_STATE_FILE="/etc/nfs-perf-test.state" # remembers what to undo # ----------------------------------------------------------------------------- # 2. NFS server settings # ----------------------------------------------------------------------------- # nfsd threads: how many client requests the server works on at the same # time. RHEL 9 default: 8. Busy servers with many clients use 32-128. # NOTE: this changes the thread count of the whole NFS server on this host # (written to /etc/nfs.conf.d/nfs-perf-test.conf; "cleanup" removes it). NFSD_THREADS="${NFSD_THREADS:-8}" # ----------------------------------------------------------------------------- # 3. The test mount (client side, on this same machine) # ----------------------------------------------------------------------------- # start-nfs.sh mounts the test export here, over the loopback interface. # All tests read and write through this mount, exactly like a real client. MOUNT_POINT="${MOUNT_POINT:-/mnt/nfs-perf-test}" NFS_VERSION="${NFS_VERSION:-4.2}" # 4.2 (RHEL 9 default), 4.1, 4.0 or 3 RSIZE_KB="${RSIZE_KB:-1024}" # largest READ per request (1024 = RHEL default and maximum) WSIZE_KB="${WSIZE_KB:-1024}" # largest WRITE per request NCONNECT="${NCONNECT:-1}" # TCP connections per mount (1 = default, up to 16) # ----------------------------------------------------------------------------- # 4. Test data (created on the export by test-nfs.sh) # ----------------------------------------------------------------------------- # data.0, data.1, ... : one file of DATA_FILE_MB per sequential stream. # The random-I/O tests all use data.0. DATA_FILE_MB="${DATA_FILE_MB:-1024}" # "yes" = empty the page cache before every read test (sync, then # drop_caches), so reads come from DISK. "no" = reads come from the server's # memory (the files were just written), which measures NFS itself. # The cache is shared by every program on this machine; see section 4.3 of # PERFORMANCE-METRICS.md before switching it on for a production server. DROP_CACHES="${DROP_CACHES:-no}" # ----------------------------------------------------------------------------- # 5. How hard and how long each test runs # ----------------------------------------------------------------------------- DURATION="${DURATION:-10}" # seconds of load for each test run # "seqwrite", "seqread": parallel streams, 1 MiB blocks, requests in flight per stream. SEQ_STREAMS="${SEQ_STREAMS:-1}" SEQ_QUEUE_DEPTH="${SEQ_QUEUE_DEPTH:-8}" # "randread", "randwrite", "cpu": 4 KiB blocks at random places in data.0. RANDOM_JOBS="${RANDOM_JOBS:-4}" # parallel jobs (like 4 application threads) RANDOM_QUEUE_DEPTH="${RANDOM_QUEUE_DEPTH:-16}" # requests in flight per job # "latency", "errors": a steady, realistic load of LOAD_RATE 4 KiB requests # per second (70% reads, 30% writes), one at a time. LOAD_RATE="${LOAD_RATE:-500}" # "metadata": this many workers create (and afterwards delete) small files. WORKERS="${WORKERS:-8}" SMALL_FILE_KB="${SMALL_FILE_KB:-4}" # "concurrency": clients reading at the same time, step by step. Each one # waits for its answer before it sends the next request. CONCURRENCY_LEVELS="${CONCURRENCY_LEVELS:-1 4 16 64 128}" # "memory": files held open at the same time while memory is measured. MEMORY_OPEN_FILES="${MEMORY_OPEN_FILES:-5000}" STARTUP_ROUNDS="${STARTUP_ROUNDS:-3}" # restarts measured by the "startup" test RECOVERY_TIMEOUT="${RECOVERY_TIMEOUT:-300}" # seconds to wait for clients to work again # The "startup" test restarts the NFS server. When the server also exports # other folders (real clients may use them), the test is skipped unless # this is "yes". ALLOW_SERVER_RESTART="${ALLOW_SERVER_RESTART:-no}" # ----------------------------------------------------------------------------- # 6. Pass / fail targets # ----------------------------------------------------------------------------- # Sensible starting points for a RHEL 9 file server with local SSD storage # and a 10 Gbit/s network. Adjust them to your own needs. A result that # misses its target is reported as FAIL; see PERFORMANCE-METRICS.md. TARGET_STARTUP_MAX_MS="${TARGET_STARTUP_MAX_MS:-5000}" # start until the server answers TARGET_RECOVERY_MAX_S="${TARGET_RECOVERY_MAX_S:-100}" # restart until clients can create files again TARGET_SEQWRITE_MIN_MBPS="${TARGET_SEQWRITE_MIN_MBPS:-200}" # MB/s, at least TARGET_SEQREAD_MIN_MBPS="${TARGET_SEQREAD_MIN_MBPS:-500}" # MB/s, at least TARGET_RANDREAD_MIN_IOPS="${TARGET_RANDREAD_MIN_IOPS:-10000}" # 4 KiB reads per second TARGET_RANDWRITE_MIN_IOPS="${TARGET_RANDWRITE_MIN_IOPS:-1000}" # 4 KiB writes per second TARGET_LATENCY_P95_MAX_MS="${TARGET_LATENCY_P95_MAX_MS:-5}" # 95% of requests faster than TARGET_LATENCY_P99_MAX_MS="${TARGET_LATENCY_P99_MAX_MS:-10}" # 99% of requests faster than TARGET_ERRORS_MAX_PCT="${TARGET_ERRORS_MAX_PCT:-0}" # failed requests, at most % TARGET_METADATA_MIN_PER_S="${TARGET_METADATA_MIN_PER_S:-500}" # small files created per second TARGET_CONCURRENCY_MIN="${TARGET_CONCURRENCY_MIN:-64}" # clients served with p99 <= target TARGET_CPU_MAX_US_PER_OP="${TARGET_CPU_MAX_US_PER_OP:-50}" # nfsd CPU microseconds per 4 KiB read TARGET_MEMORY_MAX_KB_PER_FILE="${TARGET_MEMORY_MAX_KB_PER_FILE:-4}" # server memory per open file