AFP_LANTEST(1)
π AFP_LANTEST(1) π Netatalk AFP Fileserver Manual π
okay bestie, this is the afp_lantest page from the Netatalk AFP Fileserver Manual π§ part 1 of 2, so let's get into it β¨
β¨ NAME β¨
afp_lantest, an AFP LAN performance and directory cache testing tool π
π SYNOPSIS π
afp_lantest [-34567bcGgKVv] [-h host] [-p port] [-s volume] [-u user]
[-w password] [-n iterations] [-f tests] [-F bigfile]
π DESCRIPTION π
okay so afp_lantest is a super thorough AFP (Apple Filing Protocol) performance tester π¦ built to put all kinds of AFP servers through their paces, and that includes how well the directory cache in netatalk is doing.
it runs a whole series of tests that measure file operations, directory traversal, and caching efficiency. it's giving classic file system benchmarks and specialized cache-focused tests that show off the perks of optimized directory cache validation and probabilistic validation features π
πΈ OPTIONS πΈ
here's everything you can throw at it π
-3β use the AFP 3.0 protocol version π-4β use the AFP 3.1 protocol version π-5β use the AFP 3.2 protocol version π-6β use the AFP 3.3 protocol version π-7β use the AFP 3.4 protocol version, this is the default β¨-bβ debug mode π-cβ spit results out in CSV format (the default is tabular) π-F bigfileβ use an existing file in the volume root for the read test. the file size has to match what-g/-Gare set to π-f testsβ pick which tests to run by typing digits, like"134"for tests 1, 3, and 4 π-Gβ optimize for 10-gigabit networks, which bumps the file test size up to 10 GB π₯-gβ optimize for gigabit networks, which bumps the file test size up to 1 GB π₯-h hostβ server hostname or IP address (default:localhost) π-Kβ run only the cache-focused tests (tests 9-12) π§π-n iterationsβ how many times to run the tests (default:2). heads up, foriterations> 5 the outliers get removed π-p portβ server port number (default:548) π-s volumeβ the volume name to mount for testing π-u userβ username for logging in to the AFP server (default: current uid) π«Ά-Vβ very verbose output, the chattiest setting π’-vβ verbose output π-w passwordβ password for logging in to the AFP server π
π Example with IO Monitoring π
okay bestie, IO monitoring is Linux only π§ and it needs the proc filesystem mounted at /proc_io with hidepid=0 π§. You also have to set gid to the group ID of whoever is running afp_lantest. no skipping that part, periodt π
To run as root, do this first π:
mkdir -p /proc_io && mount -t proc -o hidepid=0,gid=0 proc /proc_io
Then run it like this (-n 2 means two iterations, -7 is in the mix too β¨):
afp_lantest -n 2 -7 -h 127.0.0.1 -p 548 -u test -w test -s 'File Sharing'
And this is the tea β it spits back:
Connecting to host 127.0.0.1:548
IO monitoring: /proc_io is available
Found cnid_dbd process for user 'test': PID 40
Found privilege-dropped afpd process for user 'test': PID 36
IO monitoring enabled (afpd: 36, cnid_dbd: 40)
Run 1 => Open, stat and read 512 bytes from 1000 files [8,000 AFP ops] 4230 ms
IO Operations; afpd: 6000 READs, 7002 WRITEs | cnid_dbd: 0 READs, 2 WRITEs
Run 1 => Writing one large file [103 AFP ops] 166 ms for 100 MB (avg. 631 MB/s)
IO Operations; afpd: 0 READs, 299 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 1 => Reading one large file [102 AFP ops] 55 ms for 100 MB (avg. 1906 MB/s)
IO Operations; afpd: 100 READs, 100 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 1 => Locking/Unlocking 10000 times each [20,000 AFP ops] 859 ms
IO Operations; afpd: 0 READs, 20000 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 1 => Creating dir with 2000 files [4,000 AFP ops] 4927 ms
IO Operations; afpd: 2000 READs, 10006 WRITEs | cnid_dbd: 4 READs, 6151 WRITEs
Run 1 => Enumerate dir with 2000 files [~51 AFP ops] 1740 ms
IO Operations; afpd: 1959 READs, 50 WRITEs | cnid_dbd: 0 READs, 2 WRITEs
Run 1 => Deleting dir with 2000 files [2,000 AFP ops] 3362 ms
IO Operations; afpd: 4000 READs, 4004 WRITEs | cnid_dbd: 4 READs, 6177 WRITEs
Run 1 => Create directory tree with 1000 dirs [1,110 AFP ops] 2081 ms
IO Operations; afpd: 0 READs, 4445 WRITEs | cnid_dbd: 2 READs, 2279 WRITEs
Run 1 => Directory cache hits (100 dirs + 1000 files) [11,000 AFP ops] 5552 ms
IO Operations; afpd: 10000 READs, 11100 WRITEs | cnid_dbd: 0 READs, 100 WRITEs
Run 1 => Mixed cache operations (create/stat/enum/delete) [820 AFP ops] 1215 ms
IO Operations; afpd: 820 READs, 1623 WRITEs | cnid_dbd: 0 READs, 1203 WRITEs
Run 1 => Deep path traversal (nested directory navigation) [3,500 AFP ops] 1835 ms
IO Operations; afpd: 2500 READs, 3550 WRITEs | cnid_dbd: 0 READs, 50 WRITEs
Run 1 => Cache validation efficiency (metadata changes) [30,000 AFP ops] 14559 ms
IO Operations; afpd: 30000 READs, 30100 WRITEs | cnid_dbd: 0 READs, 100 WRITEs
Run 2 => Open, stat and read 512 bytes from 1000 files [8,000 AFP ops] 3801 ms
IO Operations; afpd: 6000 READs, 7005 WRITEs | cnid_dbd: 0 READs, 5 WRITEs
Run 2 => Writing one large file [103 AFP ops] 115 ms for 100 MB (avg. 911 MB/s)
IO Operations; afpd: 0 READs, 299 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 2 => Reading one large file [102 AFP ops] 47 ms for 100 MB (avg. 2231 MB/s)
IO Operations; afpd: 100 READs, 100 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 2 => Locking/Unlocking 10000 times each [20,000 AFP ops] 1061 ms
IO Operations; afpd: 0 READs, 20000 WRITEs | cnid_dbd: 0 READs, 0 WRITEs
Run 2 => Creating dir with 2000 files [4,000 AFP ops] 4739 ms
IO Operations; afpd: 2000 READs, 10005 WRITEs | cnid_dbd: 7 READs, 6141 WRITEs
Run 2 => Enumerate dir with 2000 files [~51 AFP ops] 1279 ms
IO Operations; afpd: 1959 READs, 50 WRITEs | cnid_dbd: 0 READs, 1 WRITEs
Run 2 => Deleting dir with 2000 files [2,000 AFP ops] 3470 ms
IO Operations; afpd: 4000 READs, 4004 WRITEs | cnid_dbd: 4 READs, 6182 WRITEs
Run 2 => Create directory tree with 1000 dirs [1,110 AFP ops] 2030 ms
IO Operations; afpd: 0 READs, 4445 WRITEs | cnid_dbd: 2 READs, 2272 WRITEs
Run 2 => Directory cache hits (100 dirs + 1000 files) [11,000 AFP ops] 7074 ms
IO Operations; afpd: 10000 READs, 11100 WRITEs | cnid_dbd: 0 READs, 100 WRITEs
Run 2 => Mixed cache operations (create/stat/enum/delete) [820 AFP ops] 1227 ms
IO Operations; afpd: 820 READs, 1622 WRITEs | cnid_dbd: 2 READs, 1243 WRITEs
Run 2 => Deep path traversal (nested directory navigation) [3,500 AFP ops] 1258 ms
IO Operations; afpd: 2500 READs, 3550 WRITEs | cnid_dbd: 0 READs, 50 WRITEs
Run 2 => Cache validation efficiency (metadata changes) [30,000 AFP ops] 20181 ms
IO Operations; afpd: 30000 READs, 30100 WRITEs | cnid_dbd: 0 READs, 100 WRITEs
Successfully deleted test directory 'LanTest-35'
Then the big summary table shows up, all averaged out across both iterations πβ¨:
Netatalk Lantest Results (Averages and standard deviations (Β±) for all tests, across 2 iterations (default))
============================================================================================================
Test Time_ms TimeΒ± AFPD_R AFPD_RΒ± AFPD_W AFPD_WΒ± CNID_R CNID_RΒ± CNID_W CNID_WΒ± MB/s
------------------------------------------------------------------ -------- ------ ------ ------- ------ ------- ------ ------- ------ ------- ------
Open, stat and read 512 bytes from 1000 files [8,000 AFP ops] 4015 303.3 6000 0.0 7003 2.2 0 0.0 3 2.2 0
Writing one large file [103 AFP ops] 140 36.1 0 0.0 299 0.0 0 0.0 0 0.0 714
Reading one large file [102 AFP ops] 51 5.7 100 0.0 100 0.0 0 0.0 0 0.0 1960
Locking/Unlocking 10000 times each [20,000 AFP ops] 960 142.8 0 0.0 20000 0.0 0 0.0 0 0.0 0
Creating dir with 2000 files [4,000 AFP ops] 4833 132.9 2000 0.0 10005 1.0 5 2.2 6146 7.1 0
Enumerate dir with 2000 files [~51 AFP ops] 1509 326.0 1959 0.0 50 0.0 0 0.0 1 1.0 0
Deleting dir with 2000 files [2,000 AFP ops] 3416 76.4 4000 0.0 4004 0.0 4 0.0 6179 3.6 0
Create directory tree with 1000 dirs [1,110 AFP ops] 2055 36.1 0 0.0 4445 0.0 2 0.0 2275 5.0 0
Directory cache hits (100 dirs + 1000 files) [11,000 AFP ops] 6313 1076.2 10000 0.0 11100 0.0 0 0.0 100 0.0 0
Mixed cache operations (create/stat/enum/delete) [820 AFP ops] 1221 8.5 820 0.0 1622 1.0 2 0.0 1223 28.3 0
Deep path traversal (nested directory navigation) [3,500 AFP ops] 1546 408.0 2500 0.0 3550 0.0 0 0.0 50 0.0 0
Cache validation efficiency (metadata changes) [30,000 AFP ops] 17370 3975.4 30000 0.0 30100 0.0 0 0.0 100 0.0 0
------------------------------------------------------------------ -------- ------ ------ ------- ------ ------- ------ ------- ------ ------- ------
Sum of all AFP OPs = 80686 43429 57379 92278 13 16077
Aggregates Summary:
------------------------------------------------------------------
Average Time per AFP OP: 0.538 ms
Average AFPD Reads per AFP OP: 0.711
Average AFPD Writes per AFP OP: 1.144
See afp_lantest manpage for more information: https://netatalk.io/manual/en/afp_lantest.1
Dircache Statistics (/var/log/afpd.log):
------------------------------------------------------------------
Sep 24 13:30:15.702673 afpd[36] {dircache.c:632} (info:AFPDaemon): dircache statistics: (user: test) entries: 0, lookups: 244476, hits: 227977 (93.3%), misses: 9228, added: 9552, removed: 9552, expunged: 7271, evicted: 0
π¦ IO Monitoring Result Columns π¦
Here's what each column means, bestie:
Time(ms)β how long the test ran, in milliseconds β±οΈTimeΒ±β the standard deviation of that runtime πAFPD_Rβ read IO operations from the afpd process πAFPD_RΒ±β the standard deviation for those afpd read IO operations πAFPD_Wβ write IO operations from the afpd process βοΈAFPD_WΒ±β the standard deviation for those afpd write IO operations βοΈCNID_*β IO measurements for the cnid_dbd process (optional) π§
π¨ Note: when you're measuring afpd read/write IO withafp_lantest, make sure yourafp.conflog level is set todefault:error.
- π More verbose logging superficially increases
*_WIO values. For dirstats at leastdefault:infois required.
π IO Monitoring Aggregates Summary π
okay so the aggregate values are purely Intrinsic Metrics π§ , because AFP operations are a mix of reads, writes, and connection related operations. no cap, that means the numbers only make sense inside their own context π«Ά
They're useful for checking how things change relative to themselves, but they don't have any external coherence or reference point for comparing against other systems. so don't go comparing your numbers to someone else's machine, bestie π
Generally, values less than 1 mean efficient operation (for example, because of batching and caching etc), and values greater than 1 mean sub-optimal operation (for example, amplification of a single operation that causes additional downstream operations). it's giving efficiency or it's giving drama π
π₯ Note: total AFP Ops are a mix of reads, writes, and other ops, so the effective 1:1 (AFP:IO) thresholds are not equal to 1. Accurate thresholds can be calculated on a per test basis using the information shown in the Testing Wiki, by comparing the relevant AFP read/write ops with the relevant AFPD_R/AFPD_W values.
Ideally, code changes should show the aggregate values going down ππ
For more information, see the Testing Wiki π
πΈ Return Codes πΈ
0β all tests passed successfully π1β one or more tests failed π
π Notes π
- π Tests that involve large file operations (tests 2 and 3) will create temporary files in the test volume.
- β³ The
-gand-Goptions significantly increase test file sizes and test duration. - π¦ Cache-focused tests (8-11) give the most insight into netatalk's directory cache performance.
- π Multiple iterations (
-n) are recommended for consistent performance measurements. - π The tool requires write access to the specified AFP volume.
β¨ See Also β¨
and that's the whole vibe, bestie π«Ά this was Netatalk 4.5.1, page AFP_LANTEST(1), served with extra sparkle ππ§
π¦ 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