Desginingn data intensive book Flashcards
B tree faster in reading or writing?
reading
Lsm trees faster in read or write?
write
Reads are typically slower on LSM-trees because
because they have to check several different data structures and SSTables at different stages of compaction.
throughput
tavane amaliyati
empirically.
به صورت تجربی
B-Trees: Write Path
B-Trees write every piece of data at least twice: once to the write-ahead log (WAL) and once to the tree page itself.
LSM-Trees: Write Path
LSM-Trees rewrite data multiple times due to compaction and merging of SSTables.
Write Amplification in LSM-Trees
Write amplification in LSM-Trees means one write to the database results in multiple writes to disk over its lifetime.
Performance Bottleneck In write-heavy applications
the rate of writing to disk can be a bottleneck.
Write Amplification Impact
Write amplification affects performance by reducing writes per second within available disk bandwidth.
LSM-Trees Write Throughput in comparison with b trees
LSM-Trees generally sustain higher write throughput than B-Trees.
Sequential Writes vs random access speed
Sequential writing in LSM-Trees is faster than the random access writes required by B-Trees.
Reason for Higher Throughput
LSM-Trees have lower write amplification in some cases and write compact SSTable files sequentially.
Batching Writes
LSM-Trees accumulate many writes in memory and then flush them to disk in one go, reducing constant disk access.
Minimizing access disk
LSM-Trees organize data in larger batches, reducing the need access disk