Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit L0 Flush #50

Open
rockeet opened this issue Aug 3, 2023 · 0 comments
Open

Omit L0 Flush #50

rockeet opened this issue Aug 3, 2023 · 0 comments
Labels
enhancement New feature or request performance Improve performance Up for grab A Task up for grab

Comments

@rockeet
Copy link
Collaborator

rockeet commented Aug 3, 2023

Description

Here Omit L0 Flush is: definitely reduce IO, memory and CPU. Vaule content should not be stored in MemTable, instead storing value offset(of WAL Log) and size in MemTable. So WAL also need to be mmap'ed. The complexity is:

  1. there are padding bytes in some single WAL Log entry, when the entry stridding page boundary
    • so we need to implement a new WAL Log format which has no padding in any single entry
    • truncate and mmap WAL Log file during WAL Log file creation
  2. rocksdb can have multiple column families, which share WAL Log, but do not share MemTable and SST
    • SST, MemTable and WAL Log mapping and management are required
  3. many changes on DB Write code path are required

Related feature

We have realized feature Convert MemTable to L0 SST, this feature needs MemTableRep to implement a new method ConvertToSST, now CSPPMemTab realized this feature by write data to file mmap.

The issue is: to be reliable, write data to file mmap does not reduce IO, it just spread the IO pressure evenly during the lifetime of MemTable.

In the best cases, we set CSPPMemTab.sync_sst_file=false, let the operating system to perform the sync appropriatly, thus when the file is deleted after L0->L1 compact while the corresponding page caches have not write back to devices, the write back to devices can be omited.

@rockeet rockeet added enhancement New feature or request performance Improve performance Up for grab A Task up for grab labels Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Improve performance Up for grab A Task up for grab
Projects
None yet
Development

No branches or pull requests

1 participant