AFP_SPEEDTEST(1)

Okay bestie, this is the AFP_SPEEDTEST(1) ๐ŸŽ€ page from the Netatalk AFP Fileserver Manual ๐Ÿ“–, and it's so good. Let's get into it ๐Ÿ’…

โœจ NAME โœจ

afp_speedtest โ€” Simple AFP file transfer benchmarking tool ๐Ÿฆ‹

๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

afp_speedtest [-1234567acDeiLTVvy] [-h host] [-p port] [-s volume] [-P
path] [-S volume2] [-u user] [-w password] [-n iterations] [-W warmup]
[-t delay] [-d size] [-z sizes] [-q quantum] [-r requests] [-F file] [-f
test]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

So afp_speedtest is an AFP benchmark testsuite for read, write, copy and server-side copy operations. It's giving full performance analysis energy ๐Ÿ”ฅ and it can run in two modes:

  • AFP Mode (default): Tests AFP protocol performance over the network ๐ŸŒ
  • Local Mode (-L): Direct filesystem I/O baseline benchmarking using POSIX syscalls ๐Ÿงš

The tool is literally packed with analysis features, like:

  • Multiple iteration testing with warmup runs ๐Ÿ”
  • Statistical analysis (mean, median, standard deviation, percentiles) ๐Ÿ“Š
  • File size sweeping to test performance across different file sizes ๐Ÿ“
  • TCP network metrics tracking (AFP mode only) ๐Ÿ›ฐ๏ธ
  • CSV output format for data analysis ๐Ÿ“

๐Ÿ’… OPTIONS ๐Ÿ’…

  • -1 โ€” Use AFP 2.1 protocol version ๐ŸŒธ
  • -2 โ€” Use AFP 2.2 protocol version ๐ŸŒธ
  • -3 โ€” Use AFP 3.0 protocol version ๐ŸŒธ
  • -4 โ€” Use AFP 3.1 protocol version ๐ŸŒธ
  • -5 โ€” Use AFP 3.2 protocol version ๐ŸŒธ
  • -6 โ€” Use AFP 3.3 protocol version ๐ŸŒธ
  • -7 โ€” Use AFP 3.4 protocol version. This one's the default, so it's the main character ๐Ÿ‘‘
  • -a โ€” Don't flush to disk after write. No flushing for you ๐Ÿ’€
  • -c โ€” CSV output mode. It automatically enables statistics and quiet mode ๐Ÿ“
  • -d size โ€” File size in Mbytes. Default is 64 MB, or the default size sweep if you don't specify one ๐Ÿ“
  • -D โ€” Disable O_DIRECT in Local mode. It's auto-enabled by default for a realistic AFP comparison. Use this flag when you want to test buffered I/O performance with the kernel page cache. It's ignored in AFP mode, since O_DIRECT isn't applicable there ๐Ÿ™ˆ
  • -e โ€” Use a sparse file โœจ
  • -f tests โ€” Comma-separated list of tests to run: Read, Write, Copy, ServerCopy. Default is Write ๐ŸŽฏ
Note: ServerCopy is automatically skipped in Local mode because it requires an AFP server. Tragic, but true ๐Ÿ˜ญ
  • -F file โ€” Read from an existing file in the volume root folder. Default is creating temporary files instead ๐Ÿ“‚
  • -h host โ€” Server hostname or IP address. Default is localhost, and it's ignored in Local mode ๐Ÿ 
  • -i โ€” Interactive mode, which prompts you before each test. Used for debugging ๐Ÿ”
  • -L โ€” Local mode: use POSIX calls for direct filesystem I/O instead of the AFP protocol. You must use it with -P to specify the directory path. It gives you baseline performance measurements without network/protocol overhead ๐Ÿง
  • -n iterations โ€” Number of test iterations to run. Default is 1. When it's greater than 1, statistics output gets automatically enabled ๐Ÿ”
  • -p port โ€” Server port number. Default is 548, and it's ignored in Local mode ๐Ÿ”Œ
  • -P path โ€” Local directory path for Local mode testing. Required when using -L ๐Ÿ“
  • -q size โ€” Packet/buffer size in Kbytes. Default is the detected server quantum in AFP mode, or 1024 KB in Local mode ๐Ÿ“ฆ
  • -r number โ€” Number of outstanding pipelined requests for parallel I/O operations. Default is 1. Higher values allow multiple in-flight AFP requests, which can improve throughput on high-latency connections ๐Ÿš€
Note: values greater than 1 need careful tuning and may not benefit all scenarios. Don't just crank it and pray ๐Ÿ™
  • -s volume โ€” Volume name to mount for testing. AFP mode only, and ignored in Local mode ๐Ÿ’พ
  • -S volume โ€” Second volume name for cross-volume copy testing. AFP mode only ๐Ÿ’พ
  • -t seconds โ€” Delay in seconds between test iterations. Default is 0. Super useful for cooling down between iterations or simulating real-world usage patterns ๐ŸงŠ
  • -T โ€” Show statistics: mean, median, std dev, min, max, P95. It's automatically enabled when iterations are greater than 1 or when you're using a size sweep ๐Ÿ“Š
  • -u user โ€” Username for AFP server authentication. Default is the current uid, and it's ignored in Local mode ๐Ÿง‘
  • -v โ€” Verbose output ๐Ÿ—ฃ๏ธ
  • -V โ€” Very verbose output ๐Ÿ“ข
  • -w password โ€” Password for AFP server authentication. Ignored in Local mode ๐Ÿ”
  • -W warmup โ€” Number of warmup runs excluded from statistics. Default is 1. Warmup runs get marked with a [W#] prefix and never make it into the stats ๐ŸŒก๏ธ
  • -y โ€” Use a new file for each run. Default is reusing the same filename โ™ป๏ธ
  • -z sizes โ€” File size sweep mode: a comma-separated list of sizes in MB. Example: -z 0.004,0.008,0.016,0.032,0.064,0.128,0.256,0.512,1,2,4,8,16,32,64,128,256,512. The minimum is 0.004 MB (4 KB) and the maximum is 1024 MB. If you specify neither -d nor -z, it uses the default 18-size sweep: 4KB,8KB,16KB,32KB,64KB,128KB,256KB,512KB,1MB,2MB,4MB,8MB,16MB,32MB,64MB,128MB,256MB,512MB ๐ŸŽ€

๐Ÿ”ฎ Configuration ๐Ÿ”ฎ

The test runner AFP client only supports the ClearTxt UAM right now, so you'll need to set it up in netatalk's afp.conf:

[Global]
uam list = uams_clrtxt.so

๐Ÿฆ„ Output Modes ๐Ÿฆ„

โœจ Text Mode (Default) โœจ

This displays formatted tables with:

  • Per-iteration timing results with throughput โฑ๏ธ
  • Statistical summaries (when enabled) ๐Ÿ“ˆ
  • Network/TCP metrics comparison tables (AFP mode only) ๐Ÿ›ฐ๏ธ
  • File size performance summary table (size sweep mode) ๐Ÿ“
  • TCP metrics evolution table (AFP mode with size sweep) ๐ŸŒŠ

๐Ÿ“ CSV Mode (-c) ๐Ÿ“

This generates three CSV tables for data analysis:

  1. Test Data Table: Individual iteration results (test_name, iteration, file_size_mb, microseconds, throughput_mbs) ๐Ÿงพ
  2. File Size Summary Table: Aggregated statistics per file size (mean, median, min, max throughput and timing) ๐Ÿ—‚๏ธ
  3. TCP Metrics Evolution Table (AFP mode only): Initial vs final TCP metrics across all tests ๐ŸŒˆ

๐ŸŽฌ Examples ๐ŸŽฌ

๐ŸŒ AFP Mode Examples ๐ŸŒ

Run 5 iterations of all four benchmark tests over AFP:

afp_speedtest -h 10.0.0.10 -s speed1 -u myuser -w mypass -n 5 -f Read,Write,Copy,ServerCopy

Run a single 64 MB write test:

afp_speedtest -h 10.0.0.10 -s speed1 -u myuser -w mypass -d 64 -f Write

Run a file size sweep with 10 iterations per size and export to CSV:

afp_speedtest -h 10.0.0.10 -s speed1 -u myuser -w mypass -n 10 -c -f Read,Write > results.csv

๐Ÿงš Local Mode Examples ๐Ÿงš

Baseline filesystem performance with 5 iterations:

afp_speedtest -L -P /mnt/fast_disk -n 5 -f Read,Write,Copy

Local mode with a custom file size sweep:

afp_speedtest -L -P /tmp/test -z 1,4,16,64,256 -n 3 -f Read,Write

Local mode with buffered I/O (O_DIRECT disabled) and CSV output:

afp_speedtest -L -D -P /mnt/nvme -c -n 10 -f Read,Write > nvme_buffered.csv

Local mode with O_DIRECT (default, for AFP comparison):

afp_speedtest -L -P /mnt/nvme -c -n 10 -f Read,Write > nvme_direct.csv

๐Ÿ‘€ Output Example ๐Ÿ‘€

Here's what a Local mode run looks like, so you know what you're getting into ๐Ÿซฃ

              AFP Speedtest - Configuration
              โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
               Mode:            Local (Direct Filesystem I/O)
               AFP Version:     N/A (Local)
               Directory:       /tmp/speedtest
               Tests:           Read,Write,Copy
               File Size:       64 MB
               Iterations:      5
               Warmup Runs:     1
               Statistics:      Enabled

              ===== Test Passes for Read =====
              Read quantum 1024 KB, size 64 MB
              Warmup: 1 runs, Measured: 5 runs
              run   microsec    MB/s
              [W1]        11739   5451.91
              1        9511   6729.05
              2        9700   6597.94
              3        9174   6976.24
              4        8949   7151.64
              5        9050   7071.82

              ===== Statistics for Read =====
              File Size:      64 MB
              Iterations:     5
              Mean:           9277 ฮผs (6898.93 MB/s)
              Median:         9174 ฮผs (6976.24 MB/s)
              Std Dev:        284 ฮผs (3.06%)
              Min:            8949 ฮผs (7151.64 MB/s)
              Max:            9700 ฮผs (6597.94 MB/s)

๐Ÿ”— See Also ๐Ÿ”—

afp_lantest(1), afpd(8) ๐Ÿ’œ


That's the whole tea โ˜• Go run your benchmarks and slay them ๐Ÿ”ฅ Netatalk 4.5.1 ยท AFP_SPEEDTEST(1) ๐Ÿซถ๐Ÿ’…

๐Ÿ“ฆ where this page comes from
  • fedora 44: netatalk-afptest 5:4.5.1-1.fc44 ยท GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-BSD AND FSFUL AND LicenseRef-Callaway-MIT
  • ๐Ÿ’– girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms