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

fix: fix the pebble config of level option #2072

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

flywukong
Copy link
Contributor

@flywukong flywukong commented Dec 15, 2023

Description

Although pebble is initialized to level 7 by default, the configuration of level options does not take effect because the level option slices has no explicit initialization.

The option file content of the chain db is as follows after fixed which meet expected option (block size is 32kB, indexBlock size is 256KB , and enable bloom filter) :

[root@tf_nodereal_dev_bsc_new_feature_testing1_ec2 chaindata]# tail -40  OPTIONS-000013 

[Level "3"]
  block_restart_interval=16
  block_size=32768
  block_size_threshold=90
  compression=Snappy
  filter_policy=rocksdb.BuiltinBloomFilter
  filter_type=table
  index_block_size=262144
  target_file_size=16777216

[Level "4"]
  block_restart_interval=16
  block_size=32768
  block_size_threshold=90
  compression=Snappy
  filter_policy=rocksdb.BuiltinBloomFilter
  filter_type=table
  index_block_size=262144
  target_file_size=33554432

[Level "5"]
  block_restart_interval=16
  block_size=32768
  block_size_threshold=90
  compression=Snappy
  filter_policy=rocksdb.BuiltinBloomFilter
  filter_type=table
  index_block_size=262144
  target_file_size=67108864

[Level "6"]
  block_restart_interval=16
  block_size=32768
  block_size_threshold=90
  compression=Snappy
  filter_policy=rocksdb.BuiltinBloomFilter
  filter_type=table
  index_block_size=262144
  target_file_size=134217728

Rationale

performance is better after fixed
(block height 3430w+ , 500M 3000iops disk and 16 core machine)
image

image

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Copy link

@RenRick RenRick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@fynnss fynnss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zzzckck zzzckck merged commit 8a440e7 into bnb-chain:develop Dec 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants