Skip to content

Commit

Permalink
opt: update badger ValueLogLoadingMode and TableLoadingMode to MemoryMap
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Nov 29, 2023
1 parent 8733a7e commit baea223
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions venus-shared/blockstore/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func BadgerBlockstoreOptions(path string, readonly bool) (Options, error) {

// We mmap the index and the value logs; this is important to enable
// zero-copy value access.
opts.ValueLogLoadingMode = FileIO
opts.TableLoadingMode = FileIO
opts.ValueLogLoadingMode = MemoryMap
opts.TableLoadingMode = MemoryMap

// Embed only values < 128 bytes in the LSM tree; larger values are stored
// in value logs.
Expand Down

0 comments on commit baea223

Please sign in to comment.