Recall & Review
beginner
What does LSM stand for in LSM trees?
LSM stands for Log-Structured Merge.
Click to reveal answer
beginner
Why are LSM trees preferred in write-heavy systems?
Because they optimize write operations by batching writes in memory and merging them later, reducing disk write overhead.
Click to reveal answer
intermediate
How do LSM trees handle data storage differently from traditional B-trees?
LSM trees write data first to an in-memory structure and then merge it to disk in large batches, while B-trees update data directly on disk, causing more random writes.
Click to reveal answer
intermediate
What is a compaction process in LSM trees?
Compaction is the process of merging multiple sorted data files on disk into fewer files to improve read performance and reclaim space.
Click to reveal answer
intermediate
Name one trade-off of using LSM trees in write-heavy systems.
While LSM trees improve write speed, they can cause slower reads due to multiple data files needing to be checked and require background compaction work.
Click to reveal answer
What is the main advantage of LSM trees in write-heavy systems?
✗ Incorrect
LSM trees improve write performance by batching writes in memory and writing them to disk in large sequential operations.
What does the compaction process in LSM trees do?
✗ Incorrect
Compaction merges multiple sorted files to reduce the number of files and improve read efficiency.
Which data structure is commonly compared with LSM trees for disk storage?
✗ Incorrect
B-trees are often compared with LSM trees because both are used for disk-based storage but have different write and read trade-offs.
What is a downside of LSM trees compared to B-trees?
✗ Incorrect
LSM trees can have slower reads because data may be spread across multiple files that need to be checked.
Where do LSM trees store new writes initially?
✗ Incorrect
New writes are first stored in an in-memory structure (like a memtable) before being flushed to disk.
Explain how LSM trees improve write performance in systems with heavy write loads.
Think about how writing in memory first helps reduce slow disk operations.
You got /4 concepts.
Describe the trade-offs involved when using LSM trees compared to traditional B-trees.
Consider both read and write performance and maintenance tasks.
You got /4 concepts.