15/39
Part 3 of 6 · EstimationLearn and do

Storage: rows a day times bytes a row

Each search logs the 20 listings it showed, with position and outcome, in a 100-byte row.

StepResult
500 million searches × 20 rows10 billion rows a day
10^10 rows × 100 bytes10^12 bytes = 1 TB a day
90 days kept for training90 TB, before replication
every feature value, 2 KB a row20 TB a day

The last line is the one that decides whether you log full features or a sample.

A billion float32 vectors take a terabyte

One billion vectors of 256 dimensions, in float32:

ComputationSize
one vector256 numbers × 4 bytes1,024 bytes
a billion10^9 × 1,024 bytes≈ 1.02 TB
in bf16256 numbers × 2 bytes512 bytes, so 512 GB

That doesn't fit in one machine's memory. bf16 halves it to 512 GB, still too big.

In the editor, write log_bytes(searches, rows, row_bytes, days) for the training logs, and vector_bytes(n, dims, bytes_per) for the vectors. The print line checks both against the two tables: 90 TB of logs and about 1 TB of vectors.