Definition · Read/write ratioA workload with read rate R and write rate W has read/write ratio r = R/W, usually written r:1. The write share is W/(R+W) and the read share is R/(R+W); the two shares are positive and sum to 1.
The ratio and the shares carry the same information and they are not the same number. A ratio compares the two parts to each other; a share compares one part to the whole. Confusing them is what makes 100:1 sound like 1%, and the conversion between them is exactly the +1 in the denominator.
Theorem · Shares from a ratioIf R/W = r and T = R + W, then W = T/(r+1) and R = Tr/(r+1). The write share is 1/(r+1) and the read share is r/(r+1).
From R = rW and T = R + W we get T = rW + W = (r+1)W, so W = T/(r+1). Then R = T − W = T − T/(r+1) = Tr/(r+1).
The shares follow by dividing by T, and they sum to 1/(r+1) + r/(r+1) = (r+1)/(r+1) = 1, which is the check worth doing: any pair of shares that does not add to one has been read off the wrong denominator.
□
r = 100, T = 10 000 req/s
write share 1/(r+1) = 1/101 = 0.990099…%
read share r/(r+1) = 100/101 = 99.009900…%
1/101 + 100/101 = 1 ✓
writes 10 000/101 = 99.01 req/s
reads 1 000 000/101 = 9 900.99 req/s
the instinct 1/r = 1/100 = 100 req/s
(1/100)/(1/101) = 101/100 1% too many writes
The two shares adding to one is the check that survives any value of r. The instinct’s pair does not: 1/100 for writes and 99/100 for reads gives a ratio of 99:1, not 100:1. So the fast way to catch this error is to convert back — take your two shares, divide one by the other, and see whether the ratio you started with comes out.
Why one percent is not a rounding error
Ninety-nine writes a second against ten thousand requests is easy to describe as noise, and for the read path it is. For everything else on this path it is the whole story. Those writes are what accumulates in “Storage from Ingest and Retention”, what gets multiplied by the replication factor, what has to be ordered and made durable, and what a partitioning scheme has to route consistently. The read path is the one that can be absorbed by a cache; the write path is the one that cannot.
Example · Ten thousand a second at a hundred to oneReads are 9 900.99 a second and writes are 99.01 a second, exactly 1 000 000/101 and 10 000/101. Sizing the storage from the total instead would overstate the ingest by a factor of 101, and sizing the cache from the total instead would overstate the read load by about one percent. The same error in the two directions costs wildly different amounts, which is the practical argument for doing the split at all.
Where the ratio comes from, and what it is a fact about
A read/write ratio is measured over a window, and it is a property of that window rather than of the system. A daily figure of 100:1 can be 5:1 during the hour a batch import runs, and the hour that matters for sizing is the busiest one rather than the average one. “Peak to Average” is where that gets a number attached to it; here it is enough to write down which window the ratio came from.
The other thing worth writing down is that the ratio is a ranged factor like any other. A ratio quoted as 100:1 is usually known to a factor of two or three either way, and the write rate it implies inherits that width. The interesting part is that the width is asymmetric in its consequences: a ratio that is wrong by 3× barely moves the read rate and moves the write rate by nearly the same 3×.