Minimum RAM requirements (with ssd storage)

Hi,

Is 4GB or 8GB the minimum requirement per fdbserver instance?
The configuration link mentions 4GB as min resource requirement.

4GB ECC RAM (per fdbserver process)

However, the another section on the same page puts this at 8GB:

memory: Maximum memory used by the process. The default value is 8GiB. When specified without a unit, MiB is assumed. This parameter does not change the memory allocation of the program. Rather, it sets a hard limit beyond which the process will kill itself and be restarted. 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). It is not recommended to decrease the value of this parameter below its default value. It may be increased if you wish to allocate a very large amount of storage engine memory or cache. In particular, when the storage_memory parameter is increased, the memory parameter should be increased by an equal amount.

If I plan to use only ssd2 engine with moderate load, is it possible to run fdbserver with 4GB of RAM? I am trying find out the configurations (flags, knobs etc) that I should change in order to reliably run fdbserver in ssd mode only and lesser RAM. I see replies to this query on forums - but they do not give an unqualified answer to this.

Another related question - If I run fdb with ssd storage engine, should I make storage_memory to 0? Will that be of any help if I want to run with 4GB total RAM per fdbserver instance?

storage_memory: Maximum memory used for data storage. This parameter is used only with memory storage engine, not the ssd storage engine. The default value is 1GiB. When specified without a unit, MB is assumed. Clusters will be restricted to using this amount of memory per process for purposes of data storage. Memory overhead associated with storing the data is counted against this total. If you increase the storage_memory, you should also increase the memory parameter by the same amount.

It would be very helpful if I can get some idea of different fdbserver components that are restricted by available memory and some guidance on how to coherently update those if I have some target total memory setting goal.

1 Like

The memory parameter specifies how much memory the process is allowed to use before it will terminate itself. It doesn’t have any other effect on how much memory the process actually uses.

The documentation for the memory parameter indicates that the intended memory usage is half the default value of 8GB, which matches the 4GB requirement. The setting of this limit to 8GB is to provide a buffer for situations when the memory happens to exceed the expectation. That said, these expected memory numbers were determined a long while ago and I couldn’t say for sure whether you can rely on memory staying below 4GB, particularly in high load or various failure scenarios.

There’s been some discussion about adding some parameters that adjust the size of various data structures in memory (e.g. page cache, storage/log queues) intelligently. The idea behind those is that you could specify how much memory you wanted to use and then a bunch of related knobs would get set appropriately. At present, it may be possible to achieve this manually through control of those knobs, though I’m not sure if there are any negative implications to modifying some of them. See for example https://github.com/apple/foundationdb/issues/554 and https://github.com/apple/foundationdb/issues/620.

storage_memory isn’t used when running the ssd storage engine, so you don’t need to worry about it.

1 Like

Thanks. I will keep a watch for above linked issues for future.