We’ve seen how AFS scales; now the costs and the payoff.
50.6 Crash Recovery
Because callbacks are state, AFS crash recovery is more involved than NFS’s:
1A client reboots and misses a recall
Client 1 has file F cached (callback valid), then reboots. While it is down, Client 2 updates F, so the server tries to break C1's callback — but C1 is unreachable and MISSES the recall message.
The upshot: a server crash is a big event — every client must be told to distrust its cache — whereas an NFS client hardly noticed. That’s the price AFS pays for a more scalable and understandable caching model.
50.7 Scale and Performance
With callbacks in place, AFSv2 was measured to scale to about 50 clients per server (up from 20), and client performance often came close to purely local, since in the common case every access is served from the local cache.
To compare with NFS, we reason analytically. Assume files of , , or blocks (small/medium/large, with only large files exceeding client memory); a remote block access costs , local disk , local memory , and :
| NFS | AFS | AFS / NFS | |
|---|---|---|---|
| small file, seq read | Ns·Lnet | Ns·Lnet | 1 |
| small file, seq re-read | Ns·Lmem | Ns·Lmem | 1 |
| medium file, seq read | Nm·Lnet | Nm·Lnet | 1 |
| medium file, seq re-read | Nm·Lmem | Nm·Lmem | 1 |
| large file, seq read | NL·Lnet | NL·Lnet | 1 |
| large file, seq re-read | NL·Lnet | NL·Ldisk | Ldisk / Lnet ✓ AFS wins |
| large file, single read | Lnet | NL·Lnet | NL ✗ AFS slower |
| small file, seq write | Ns·Lnet | Ns·Lnet | 1 |
| large file, seq write | NL·Lnet | NL·Lnet | 1 |
| large file, seq overwrite | NL·Lnet | 2·NL·Lnet | 2 ✗ AFS slower |
| large file, single write | Lnet | 2·NL·Lnet | 2·NL ✗ AFS slower |
The pattern: mostly equivalent, with two telling exceptions. AFS wins on a large-file re-read (its on-disk cache holds a file too big for NFS’s memory cache, which must re-fetch). AFS loses whenever only a small part of a large file is touched, and on overwrites — because it fetches (and re-stores) the whole file regardless.
Aside: The Importance of Workload
These outcomes hinge on assumptions. AFS’s designers assumed files were mostly not shared and accessed sequentially in their entirety — and under those assumptions AFS shines. But a workload of tiny appends to a big log, or random updates to a database, is exactly where whole-file transfer hurts. Evaluating a system always comes back to: which workload?50.8 Other Improvements
Like FFS before it, AFS used the chance to add genuinely nice features:
- A true global namespace global namespace A design, provided by AFS, in which every file is named the same way on all client machines, so a given path refers to the same file everywhere. This contrasts with NFS, where each client may mount servers at whatever mount points it chooses, making consistent naming across clients only a matter of convention and administrative effort. defined in ch. 50 — open in glossary — every file is named the same way on every client. (NFS lets each client mount servers however it likes, so consistent naming is only a convention.)
- Real security: authenticating users and keeping files private. (Early NFS security was famously weak.)
- Flexible, user-managed access-control lists, and strong management tools for administrators — areas where AFS was well ahead of its time.
50.9 Summary
AFS shows a very different path from NFS: by minimizing server interactions through whole-file caching and callbacks, one server supports many clients, and its consistency model is simple to reason about — free of NFS’s occasional weirdness. Its namespace, security, and access control were ahead of their time.
And yet AFS is on the decline: NFS became an open standard, so many vendors
supported it, and — along with Windows’ CIFS — it dominates the market. AFS’s
lasting influence is its ideas rather than the system itself. Tellingly,
NFSv4 added server state (an open protocol message), growing ever more
AFS-like. Next, a closing dialogue wraps up the distributed arc — and the book.
Check yourself: AFS crash recovery, performance, and legacy
1.Why is crash recovery harder in AFS than in NFS?
2.What should an AFS client do after it reboots?
3.What happens when the AFS server crashes, and how do clients cope?
4.In the AFS-vs-NFS comparison, which workload does AFS handle notably BETTER?
5.Which workloads are WORSE on AFS, and why?
6.What is AFS's lasting legacy, even as the system itself declines?