Raphael Carvalho — Building state-of-art LSM-tree compaction in ScyllaDB
—
LSM-tree storage engines are known for providing very fast write throughput, as they allow new data to be flushed into immutable files called Sorted String Table, . SSTable. But there’s no such thing as a free lunch. This append-only nature of the LSM tree generates read amplification over time, because a given key can be redundantly stored across multiple immutable files. That’s the reason storage engines have to employ a background compaction process, to reduce both read and space amplification. Compaction itself is very complex and it plays an essential role in the system’s performance. There are multiple compaction policies, and each suits a particular workload better. For example, leveled policy is better for workloads performing overwrites that are very sensitive to read latency, but that comes at the cost of higher write amplification, meaning that the system cannot keep up with the write rate unless you throw faster disks or more instances at it. On the other hand, there’s the tiered policy that favors write performance but at the cost of higher read and space amplification. There can also be a policy which mixes both tiers and levels, to have something in between, efficiency wise. The RUM conjecture, which states that only two amplification factors can be optimized at the expense of a third, is used by engineers to come up with efficient policies for a variety of workloads. A good example is the ScyllaDB incremental compaction approach that breaks large files into fixed-size fragments, to fix the 100% space overhead that affects most implementations of tiered policy out there. ScyllaDB also leverages industrial controller theory to avoid the endless tuning cycle for compaction speed. If compaction is slower than it should be, the compaction backlog increases, resulting in bad read latency and potentially the system running out of disk space. If compaction is running too fast, then resources are being needlessly stolen from foreground requests, affecting both latency and throughput. So nothing is better than a closed-loop control system that measures backlog and adjusts compaction speed accordingly. That frees your DBAs to perform more important tasks.
Download slides:
9 views
1022
294
5 months ago 00:11:36 1
A GUERRA que NUNCA ACABOU: como a COREIA se DIVIDIU! | Cortes do João Carvalho
7 months ago 01:04:44 1
Do Sofrimento ao FIM da ESCALA 6x1 com Luide Matos e João Carvalho por Vida Além do Trabalho
7 months ago 00:11:11 1
Professor e Historiador EXPLICA porque as ELEIÇÕES são UMA FARSA! | Cortes do João Carvalho
7 months ago 00:22:59 1
Israel e como o SIONISMO pretende COLONIZAR o Oriente Médio - Papo Reto 02 | João Carvalho
7 months ago 00:05:01 1
Marisa Monte | Pra Melhorar feat Seu Jorge e Flor (vídeo)
7 months ago 00:03:26 1
Marisa Monte | Feliz, Alegre e Forte (vídeo)
8 months ago 00:33:48 1
Como a CIA COOPTA SINDICATOS PELEGOS: A Luta de Classes Sabotada! | João Carvalho
8 months ago 00:04:05 2
MC Hariel e Gilberto Gil - A Dança - FUNK SUPERAÇÃO
8 months ago 00:02:48 1
Gloria Groove - Nosso Primeiro Beijo (Ao Vivo)
8 months ago 00:02:48 1
Ofenbach vs. Nick Waterhouse - Katchi (Official Video)
8 months ago 00:02:53 1
Michel Teló - QUEM FALOU MENTIU - Churrasco do Teló - EP
8 months ago 00:41:02 1
Sahaja Yoga: O caminho do despertar | Um tributo a Shri Mataji | Documentário
9 months ago 00:12:31 1
O melhor CHORO de todos os tempos [Curiosidades #11]
9 months ago 00:01:27 1
DATENA narra gol de Portugal contra a Croácia - Eurocopa 2016
9 months ago 00:34:47 1
Vampiro a Máscara: RPG de Horror Pessoal para Adultos
9 months ago 00:04:15 1
Victoria, Anitta - GET UP B*TCH! shake ya ass (with Anitta) (Official Video)
9 months ago 00:08:00 3
Vila Isabel 2025 - Samba Concorrente - André Diniz, Gustavo Clarão, Thales Nunes e Parceiros
10 months ago 00:40:20 1
ELE VOLTOU?! Sobre o meu RETORNO, minha SAÚDE e o FUTURO do canal! | Cortes do João Carvalho
10 months ago 00:06:43 1
GOODNESS OF GOD (BONDADE DE DEUS) - Ron Kenoly, Joe Vasconcelos, Sing Church Worship
10 months ago 00:03:45 1
IZA - I Put a Spell On You
10 months ago 00:02:55 1
AgroPlay Verão - Nosso Quadro @anacastelaoficial
10 months ago 00:08:24 1
Alok, Zeeba and IRO - Ocean (Official Music Video)
10 months ago 00:11:38 1
Dovletdzhan Yagshimuradov V Rafael Carvalho | Full Fight | Bellator 277
10 months ago 00:10:44 1
Viva o SONHO AMERICANO na Califórnia com... SALÁRIO MÍNIMO! | Cortes do João Carvalho