This topic describes how to set the maximum memory for a database and provides configuration examples.
Parameters for setting the maximum memory
OceanSeek provides the following parameters for setting the maximum memory for a database:
memory_limit_percentage: specifies the percentage of the maximum server memory that can be occupied by OceanSeek.memory_limit: specifies the maximum memory for OceanSeek. Ifmemory_limitis set to0M, the value ofmemory_limit_percentageprevails. Ifmemory_limitis set to another value, the specified absolute value is used.
Examples
The following examples show how the values of the memory_limit_percentage and memory_limit parameters affect the actual maximum memory available to OceanSeek, with the total server memory being 100 GB.
Example |
memory_limit_percentage |
memory_limit |
Maximum memory of OceanSeek |
|---|---|---|---|
| Example 1 | 80 | 0M | 80 GB |
| Example 2 | 80 | 90 GB | 90 GB |
In Example 1,
memory_limitis set to0M. Therefore, thememory_limit_percentageparameter determines the maximum memory of OceanSeek, which is 100 GB × 80% = 80 GB.In Example 2,
memory_limitis set to 90 GB. Therefore, thememory_limitparameter determines the maximum memory of OceanSeek, which is 90 GB.Notice
Mainstream OceanSeek servers are usually configured with 384 GB or 512 GB of memory. We recommend that you allocate 80% of the 384 GB server memory or 90% of the 512 GB server memory to OceanSeek.