Eighty Two Versus Forty Two

Two engines, one 200-byte row update. Compute the write amplification of each, meaning bytes physically written to disk per byte of logical change.

Engine A, a B-tree over 8 KiB pages (PostgreSQL-style, full_page_writes on). The row's page has not been modified since the last checkpoint, so the server writes the entire 8,192-byte page image into the WAL, and the checkpointer later writes that same 8,192-byte page out to the data file. Ignore index pages.

Engine B, a leveled LSM tree with size ratio T=10T = 10 and L=4L = 4 levels below the memtable. The record is written once to the write-ahead log, once again when the memtable flushes to L0, and is then rewritten roughly TT times at each level as it is merged downward.

Which pair is closest?

A

Engine A about 2x, Engine B about 42x

B

Engine A about 82x, Engine B about 42x

C

Engine A about 41x, Engine B about 42x

D

Engine A about 82x, Engine B about 5x