Set the maximum memory for an OceanBase database

2023-10-24 09:23:03  Updated

This topic describes how to set the maximum memory for an OceanBase database and provides configuration examples.

Parameters used to set the maximum memory for an OceanBase database

OceanBase Database provides the following parameters for you to set the maximum memory for an OceanBase database:

  • memory_limit_percentage: specifies the percentage of maximum server memory that can be occupied by an OceanBase database.

  • memory_limit: specifies the maximum memory for an OceanBase database. If the memory_limit parameter is set to 0, the memory_limit_percentage parameter prevails. Otherwise, the memory_limit parameter prevails.

Examples

The following table provides two configuration examples in which the maximum server memory is 100 GB. Below the table, how the memory_limit_percentage and memory_limit parameters affect the maximum memory of an OceanBase database is described.

Example memory_limit_percentage memory_limit Maximum memory of an OceanBase database
Example 1 80 0 80 GB
Example 2 80 90 GB 90 GB
  • In Example 1, the memory_limit parameter is set to 0. Therefore, the memory_limit_percentage parameter prevails, and the maximum memory of the OceanBase database is 80 GB, which is calculated by multiplying 100 GB and 80%.

  • In Example 2, the memory_limit parameter is set to 90 GB. Therefore, the memory_limit parameter determines the maximum memory of the OceanBase database, which is 90 GB.

Notice

Mainstream OceanBase Database servers are usually configured with 384 GB or 512 GB memory. We recommend that you allocate 80% of the 384 GB server memory or 90% of the 512 GB server memory to an OceanBase database.

Contact Us