Why is the default value for '--memory-limit' set to half of the total system memory?

Hello community,

Regarding ‘–memory-limit’, the documentation states: “System memory limit in GBs during sorting and postsorting. By default, the limit is half of the total system memory. (default: 62)”

The question is, why is this value set to half of the system memory? How can we determine the best value? For example, if we have 220GB of memory, should we set it to 110GB, or can we allocate more without any negative impact or other considerations?

It is set to half the total system limit to be safe. We only have control over the memory we allocate and there can be other processes running simultaneously. You can set it higher, but the closer you get to the installed memory the higher risk you have of running out of memory.

1 Like