lotusdblabs / lotusdb

Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree.
https://lotusdblabs.github.io
Apache License 2.0
2.07k stars 180 forks source link

OSPP 2024: Process and performance optimization of Value Log Compaction #158

Closed yanxiaoqi932 closed 2 weeks ago

yanxiaoqi932 commented 6 months ago

OSPP 2024 项目发布:Value Log Compaction 的流程与性能优化

LotusDB当前Compaction存在的不足

当前LotusDB的Value Log Compaction模块存在比较大的性能瓶颈,主要包括三个方面:

  1. Compaction只能由用户手动执行,如果用户长期没有执行Compaction,则会导致磁盘中冗余数据过多;
  2. Value Log Compaction过程中需要大量访问磁盘中的BPTree,以判断对应的数据是否失效,这会降低compaction的效率,同时影响读写性能;
  3. Value Log Compaction过程中无法进行Memory Table的刷盘,当写负载非常大时,compaction会影响到写入性能。 因此,希望从这三个性能瓶颈入手,对Value Log Compaction模块进行优化。

    希望实现的目标

    项目需要实现的目标为优化Value Log Compaction 的流程与性能,主要包括三个部分:

  4. 记录value log冗余度,监听协程需要根据冗余度自动执行Value Log Compaction;
  5. 设计更高效的,与BPTree解耦的Value Log Compaction数据有效性检验方案,避免Value Log Compaction流程对BPTree造成较大负载;
  6. 优化Value Log Compaction执行策略,结合外部读写负载来动态选择是否执行Value Log Compaction,避免在读写负载高的情况下发起Value Log Compaction。

欢迎各位同学提交proposal!(邮箱:3237461966@qq.com)

KANIOYH commented 6 months ago

Hi, I am interested in this issue and intend to submit a proposal soon.

yanxiaoqi932 commented 6 months ago

Hi, I am interested in this issue and intend to submit a proposal soon.

Hope your proposal 😄