nspcc-dev/neo-go

Allow configurable LevelDB options

開放

#3,829 建立於 2025年3月5日

 (2 則留言) (1 個反應) (0 位負責人)Go (108 個分叉)auto 404
I2S4U4configenhancementgood first issue

倉庫指標

星標
 (132 顆星)
PR 合併指標
 (平均合併 4天 19小時) (30 天內合併 16 個 PR)

描述

Is your feature request related to a problem? Please describe.

The current configuration for LevelDB creates too many files. It's possible to decrease the number of files by changing the CompactionTableSize on LevelDB. The large amount of files has a negative impact on our IT infrastructure.

Describe the solution you'd like

Level DB has some parameters that can be tweaked, such as WriteBufferSize, BlockSize, BlockCacheCapacity, CompactionTableSize, CompactionL0Trigger, and OpenFilesCacheCapacity. These values should be configurable through the config file.

Describe alternatives you've considered

I've tried running 'db dump', but it takes a long time to complete.

Additional context

I've implemented this feature here, without any kind of test. https://github.com/linkd-academy/neo-go/commit/8ca4a311c01f7627967bf6fe818083b02271bb96

Result with 5GB CompactionTableSize (may not be ideal, 1 GB could be better): Image

Changing some parameters made it run faster on my macOS. My computer was barely usable during synchronization.

Don't forget to add labels!

  • enhancement

貢獻者指南