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โ DisableO_DIRECTin 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, sinceO_DIRECTisn'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-Pto 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-dnor-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:
- Test Data Table: Individual iteration results (test_name, iteration, file_size_mb, microseconds, throughput_mbs) ๐งพ
- File Size Summary Table: Aggregated statistics per file size (mean, median, min, max throughput and timing) ๐๏ธ
- 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