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 and 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 times at each level as it is merged downward.
Which pair is closest?
Sign in to answer questions and track your progress
Sign In