Global Flags:
–block_rate int Block profiling rate. Must be used along with block profile_mode
–config string Configuration file. Takes precedence over default values, but is overridden to values set with environment variables and flags.
–profile_mode string Enable profiling mode, one of [cpu, mem, mutex, block]
What are the meanings of these parameters? If i use this --profile_mode mem , I will keep OOM away?
do you have a demo of this ?
–posting_tables string Specifies how Badger LSM tree is stored. Options are loadtoram, memorymap and fileio; which consume most to least RAM while providing best to worst readperformance respectively. (default “memorymap”)
It looks like the mode of LSM tree store my tabke different RAN ,can you explanin what loadtoram,memorymap and fileio are? what difference between them? which take least RAM?
// FileLoadingMode specifies how data in LSM table files and value log files should
// be loaded.
type FileLoadingMode int
const (
// FileIO indicates that files must be loaded using standard I/O
FileIO FileLoadingMode = iota
// LoadToRAM indicates that file must be loaded into RAM
LoadToRAM
// MemoryMap indicates that that the file must be memory-mapped
MemoryMap
)
What are their characteristics?