§50.6–50.9AFS Crash Recovery, Scale and Performance, and Summary

Part III OSTEP pp. 646–650 · ~6 min read

  • global namespace

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:

Callbacks are state, so both client and server crashes need care — the price of AFS's scalable, sensible caching model.
Client 1cache: F (was valid)rebootingServer (Vice)tries to recall C1's callbackvalidC1 is down → it never hears that F changed

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.

step 1 / 4

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 NsN_s, NmN_m, or NLN_L blocks (small/medium/large, with only large files exceeding client memory); a remote block access costs LnetL_{net}, local disk LdiskL_{disk}, local memory LmemL_{mem}, and Lnet>Ldisk>LmemL_{net} > L_{disk} > L_{mem}:

Figure 50.4: AFS vs NFS across 11 workloads. Files have Nₛ / Nₘ / N_L blocks (small/medium/large); L_net > L_disk > L_mem. Rightmost column = AFS/NFS ratio (1 = same; >1 = AFS slower).
NFSAFSAFS / NFS
small file, seq readNs·LnetNs·Lnet1
small file, seq re-readNs·LmemNs·Lmem1
medium file, seq readNm·LnetNm·Lnet1
medium file, seq re-readNm·LmemNm·Lmem1
large file, seq readNL·LnetNL·Lnet1
large file, seq re-readNL·LnetNL·LdiskLdisk / Lnet ✓ AFS wins
large file, single readLnetNL·LnetNL ✗ AFS slower
small file, seq writeNs·LnetNs·Lnet1
large file, seq writeNL·LnetNL·Lnet1
large file, seq overwriteNL·Lnet2·NL·Lnet2 ✗ AFS slower
large file, single writeLnet2·NL·Lnet2·NL ✗ AFS slower
Dotted-underlined cells have explanations — click one.

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 — 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?

6 questions