In an LSM-tree, what happens to new writes in terms of memtable and SSTable?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

In an LSM-tree, what happens to new writes in terms of memtable and SSTable?

Explanation:
The main idea being tested is how writes are buffered and persisted in an LSM-tree. Writes are first placed in an in-memory structure called a memtable. This lets the system absorb new data quickly and avoids expensive random writes to disk. When the memtable becomes full, its contents are flushed to disk as a new SSTable, which is an immutable on-disk file containing sorted key–value pairs. After the flush, a fresh memtable starts collecting new writes. Over time, multiple SSTables exist on disk and are periodically merged through compaction to keep reads efficient and storage organized. This design, with a memtable in memory that is flushed to disk as SSTables, is what makes the write path in an LSM-tree effective. So, the correct description matches: writes go into an in-memory memtable; when full, they are flushed to a disk-based SSTable.

The main idea being tested is how writes are buffered and persisted in an LSM-tree. Writes are first placed in an in-memory structure called a memtable. This lets the system absorb new data quickly and avoids expensive random writes to disk. When the memtable becomes full, its contents are flushed to disk as a new SSTable, which is an immutable on-disk file containing sorted key–value pairs. After the flush, a fresh memtable starts collecting new writes. Over time, multiple SSTables exist on disk and are periodically merged through compaction to keep reads efficient and storage organized. This design, with a memtable in memory that is flushed to disk as SSTables, is what makes the write path in an LSM-tree effective.

So, the correct description matches: writes go into an in-memory memtable; when full, they are flushed to a disk-based SSTable.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy