apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.5k stars 1.31k forks source link

Spill transaction log data onto storage servers #1004

Open etschannen opened 5 years ago

etschannen commented 5 years ago

When enough data builds up on the transaction logs that we can no longer keep all of the unpopped mutations in memory, we need to write the mutations to disk. We call this process "spilling" the mutation from memory to disk.

Spilling puts an additional burden on the transaction logs that reduces their throughput significantly. The goal of this project is to have storage servers pull data from unpopped tags instead of letting the data stay on the transaction logs. Worst case, this will 2x increased write load on the storage servers. This plan also means we can spill for much longer without running out of disk space, and the disked used by the transaction logs can be sized to exactly fit memory.

There are two parts to implementing this. The first is a mechanism for telling the system to spill a tag to a set of storage servers:

The second part is adding a component to data distribution which will spill tags for failed storage servers or regions.

etschannen commented 5 years ago

The new transaction log spilling mechanism in 6.1 seems to be performing well enough that this feature is not needed in the short term.