About FDB memory usage

FoundationDB Version: 7.1.44

For ssd-2 storage engine, my storage server memory usage upper to 7GB. However, I use all default configurations.

According to configuration.html#fdbserver-section, It should only use about 4GB RAM.

So, I want to know where the memory is used?

  1. cache_memory used 2GB.
  2. STORAGE_HARD_LIMIT_BYTES used 1.5GB (however, my storage queue size should be almost empty, because I didn’t write many at above time).
  3. in-memory status used few hundreds MB?

So, who may use the another 3.5GB~5GB RAM? There is any way to figure out the memory usage?

My purpose is to avoid oom kill, it would cause cache miss. And I also want to cache as more as possible data in memory to increase throughput.

According to configuration.html#fdbserver-section , It should only use about 4GB RAM.

The default value for the memory setting is 8GiB not 4GiB:

memory : Maximum resident memory used by the process. The default value is 8GiB. When specified without a unit, MiB is assumed.

So, who may use the another 3.5GB~5GB RAM? There is any way to figure out the memory usage?

You could look at the following logs: Type="MemoryMetrics" and Type="ProcessMetrics" to get a better idea and probably Type="StorageMetrics".

The default value of 8GiB is double the intended memory usage in the default configuration (providing an emergency buffer to deal with memory leaks or similar problems).

So, I think the memory should be a little more than 4GB at most.