Server global flags

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?

global flag: 当你设置的时候可以监控dgraph的一些读写性能,内存,cpu使用的情况。 设置后dgraph的性能可能下降。

posting_tables: 分别列出了一些LSM存储的形式, 字面上很好理解:FileIO, MemoryMap, LoadToRAM 依次是内存使用上升,速度快,当然你需要足够的内存。这个设置只是尽可能的减少你的内存使用,当你数据量足够大的时候,这些设置不会是你需要的, 你需要的是提高你的内存。

你可以使用 dgraph server --help 查看各项参数的含义

eg: --posting_tables : 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”)

:grin:

我设置了posting_tables 为fileio 确实内存起伏减小了但是感觉还是会持续增加,机器中最大内存是16G,不知道能不能扛住 :joy:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.