Skip to content

Commit

Permalink
Use format_version 5
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiNano committed Sep 12, 2024
1 parent 012c053 commit 3f089a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nano/store/rocksdb/rocksdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ rocksdb::BlockBasedTableOptions nano::store::rocksdb::component::get_table_optio
// Improve point lookup performance be using the data block hash index (uses about 5% more space).
table_options.data_block_index_type = ::rocksdb::BlockBasedTableOptions::DataBlockIndexType::kDataBlockBinaryAndHash;

// Using format_version=4 significantly reduces the index block size, in some cases around 4-5x.
// This frees more space in block cache, which would result in higher hit rate for data and filter blocks,
// or offer the same performance with a smaller block cache size.
table_options.format_version = 4;
// Using storage format_version 5.
// Version 5 offers improved read spead, caching and better compression (if enabled)
// Any existing ledger data in version 4 will not be migrated. New data will be written in version 5.
table_options.format_version = 5;

// Block cache for reads
table_options.block_cache = ::rocksdb::NewLRUCache (rocksdb_config.read_cache * 1024 * 1024);
Expand Down

0 comments on commit 3f089a2

Please sign in to comment.