# Processor sharing: equal capacity is not equal latency

These are exact substitutions into stationary queueing formulas using invented
inputs, not a new theorem, trace simulation or SSD benchmark. Generated 2026-11-20.
Service requirements are milliseconds at the full server rate; arrival rates are
requests per second. The two distributions reuse the existing
[service-variance example](https://hesela.dev/research/mg1-variance/README.md).

Run with Python 3 and its standard library, with all three files in one directory:

```sh
python3 -B model.py --check
python3 -B -m unittest discover -s . -p test_model.py
```

[model.py](model.py), [tests](test_model.py), [results.json](results.json).

The JSON retains rational inputs, exact fractions, display values, model
assumptions and a SHA-256 of the generator. No randomness or fitted parameters.
At 200 requests/s, ideal PS yields 1.25 ms in both cases, while FCFS yields
1.125 ms and 4.21875 ms. This changes the policy ranking, not just the magnitude.

## A separate finite-batch question

The stationary mean conditions only on the tagged size, not the current queue.
It cannot be substituted for a prediction using the remaining work of existing
jobs; Ward and Whitt distinguish these conditioning choices.

With no future arrivals, ideal equal sharing and unit full-rate capacity,
tagged work x finishes at T = x + sum(min(x, r_i)). Each initial competitor
receives min(x, r_i) work before the tagged job finishes, and the server is
busy throughout. This is the standard no-arrival identity, not a new theorem.

For x = 1 ms, two competitors totaling 2 ms give different completions:
remaining work (0.25, 1.75) ms gives 2.25 ms; (1, 1) ms gives 3 ms.
Count and total work are equal; their allocation differs. These constructed
finite batches are not compared directly with the 1.25 ms stationary mean,
which describes a different arrival model. The additive finite_batch JSON
object retains the exact inputs and output. Tests compare the formula against
an independent event-driven oracle for 14,005 small cases, including ties and
zero-work entries. No empirical sample or confidence interval applies.

Sources checked 2026-11-20:
- [Wierman, Bansal and Harchol-Balter (2004), pp.73-74](https://www.cs.cmu.edu/~harchol/Papers/conjecture.pdf): conditional PS mean; DOI 10.1016/S0167-6377(03)00061-0.
- [Ward and Whitt, author manuscript, sections 1.2-1.3](https://www.columbia.edu/~ww2040/response.pdf): no-arrival equation (1.6) and state conditioning, equations (1.36)/(1.38).
- [Larson and Odoni, section 4.7](https://web.mit.edu/urban_or_book/www/book/chapter4/4.7.html): FCFS mean.
- [Wierman and Harchol-Balter (2005), sections 2-3](https://www.cs.cmu.edu/~harchol/Papers/Sigmetrics05a.pdf): conditional variance is a separate question.

Only the specified mean is insensitive here; these calculations produce no
latency distribution or percentile. No empirical sample or confidence interval
applies. Code and constructed outputs: CC0-1.0; cited publications retain their rights.
