# Four parity blocks are not four racks
Prepared 2026-11-28. Original calculation and code: CC0-1.0.

For one 10-data + 4-parity stripe, local recovery of the whole stripe needs ten
correct surviving code blocks. Rack failures remove blocks according to their
placement, not according to the code's parity count.

The f4 paper describes an initial best-effort spread across racks and a placement
balancer that corrects violations (section 5.5). Its subsequent failure analysis
assumes distinct failure domains (section 6.4). Those are conditions to preserve,
not consequences of the capacity expansion factor.

## Same stripe, same rack universe
These are three constructed placements of 14 blocks across 14 labeled racks.
They are not observations of f4. Zero occupancy means no block of THIS stripe.

| Placement | Rack occupancy | Four-rack subsets | Within local erasure budget | Outside local erasure budget |
| --- | --- | ---: | ---: | ---: |
| One block per rack | fourteen ones | 1001 | 1001 | 0 |
| One colocated pair | 2, 0, twelve ones | 1001 | 781 | 220 |
| Seven colocated pairs | seven twos, seven zeros | 1001 | 721 | 280 |

For one colocated pair, an out-of-budget four-rack subset contains the double
rack and three of the twelve single-block racks. There are C(12,3) = 220 such
subsets; each erases five blocks. The empty rack cannot be among those subsets.
The denominator C(14,4) = 1001 counts all possible four-rack subsets, including
racks with no block of this stripe. No equally-likely failure model is asserted.

With seven colocated pairs, three occupied rack failures already erase six
blocks. Exactly C(7,3) = 35 of the C(14,3) = 364 three-rack subsets do this.
For four failed racks, the outside-budget count is
C(7,3)*C(7,1) + C(7,4) = 280. The code emits the complete histogram for every
failure cardinality, not only the selected table.

## Method and reproduction
```sh
node placement.mjs --check
node --test placement.test.mjs
```
Run `node placement.mjs` to regenerate placement-results.json.

Let occupancy r be a_r. The coefficient of x^f y^e in
product_r(1 + x*y^a_r) counts subsets of f failed racks that erase e blocks.
A descending update on f uses each rack once. Coefficients are exact BigInts.
Summing coefficients with e <= 4 gives the modeled locally decodable stripes.
The separate test oracle enumerates each subset directly; it does not reuse
the coefficient recurrence. No random seed, installed package or empirical input
is needed. The API bounds inputs to 64 racks and 256 total blocks.

## What this cannot establish
The model has known erasures, correct surviving blocks, no pre-existing fault,
and no repair during the selected simultaneous outages. It is not an error
corrector, a placement scheduler, a recovery implementation or a reliability
estimate. Pattern counts are not failure rates or field probabilities.

Outside the local erasure budget does not mean every BLOB in that stripe is
unreadable: a BLOB in a surviving data block can remain readable. Nor does it
mean permanent or global loss; geographic recovery and returning racks are
outside this model. Keys, metadata, service availability and repair time are
not tested. No reproduction of Figure 14 or claimed defect in f4 is offered.

## Primary source
[Muralidhar et al., f4: Facebook's Warm BLOB Storage System, OSDI 2014](https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-muralidhar.pdf),
sections 5.5 and 6.4, printed pages 390-391 and 393-394; accessed 2026-11-28.
The paper and its figures are not redistributed. This supplement is an original
deterministic sensitivity example, independent of the existing capacity results.
