This topic describes the minimum resource configuration that we recommend based on the minimum hardware configuration of a server.
Minimum hardware configurations of a server
The following table lists the minimum server configuration recommended based on production standards.
| Server parameter | Description |
|---|---|
| Server quantity | 3 |
| CPU | 8 cores |
| Memory | 64 GB |
| Disk | We recommend that you use SSDs and the disk space must be greater than four times the memory size. 1 TB is recommended. |
| NIC | 10 Gbit/s Ethernet or faster |
| Operating system | Red Hat Enterprise Linux Server V7.2 (Linux kernel V3.10.0 and later) |
| File system | EXT4 or XFS recommended |
Maximum memory available
Description
You can use the memory_limit parameter to specify the maximum memory that the OBServer node can use. As the recommended minimum memory is 64 GB and some of it must be reserved for the operating system, we recommend that you exclusively allocate 58 GB of memory to the OBServer node. This memory space will be shared by the sys tenant and the programs.
Value
58G is recommended.
Configuration method
Set the startup parameter memory_limit when a cluster starts.
sys tenant memory
Description
As the recommended minimum memory is 64 GB and the OBServer node exclusively occupies 58 GB, the sys tenant must have 4 GB of available memory space.
Value
4G is recommended.
Configuration method
Execute the following statement:
obclient>ALTER RESOURCE UNIT sys_unit_config min_memory='4G',max_memory='4G';
Program running memory
Description
You can use the system_memory parameter to configure the memory allocated to the tenant whose ID is 500. This memory space is the program running memory.
Value
22G is recommended.
Configuration method
Set the startup parameter system_memory when a cluster starts.
Execution stack memory for a single thread
Description
You can use the stack_size parameter to set the execution stack memory size for a single thread.
Value
1M is recommended. In an environment that requires the minimum memory, you can set it to 512K. However, reducing the memory may bring about some risks.
Configuration method
Set the startup parameter stack_size when a cluster starts.
Maximum memory allowed for Libeasy
Description
You can use the __easy_memory_limit parameter to configure the network framework memory.
Note
The parameter is in the
_xx_xxformat, which means that it is a hidden parameter and cannot be queried by using theSHOW PARAMETERSstatement. However, you can view the parameter by executing the following SQL statement:
obclient> SELECT * FROM oceanbase.__all_virtual_sys_parameter_stat WHERE name='__easy_memory_limit';
Value
4G is recommended.
Configuration method
Set the startup parameter __easy_memory_limit when a cluster starts.
Maximum number of partitions
Description
You can use the _max_partition_cnt_per_server parameter to configure the maximum number of partitions allowed for a single OBServer node.
Note
The parameter is in the
_xx_xxformat, which means that it is a hidden parameter and cannot be queried by using theSHOW PARAMETERSstatement. However, you can view the parameter by executing the following SQL statement:
obclient> SELECT * FROM oceanbase.__all_virtual_sys_parameter_stat WHERE name='_max_partition_cnt_per_server';
Value
10000 is recommended.
Configuration method
Set the startup parameter _max_partition_cnt_per_server when a cluster starts.
Maximum number of connections
Description
You can use the max_session_count parameter in _resource_limit_spec to configure the maximum number of connections.
Value
We recommend that you do not set it to a value greater than 10000.
Configuration method
When a cluster starts, set the startup parameter _resource_limit_spec and enable resource limit check (_enable_resource_limit_spec). By default, the resource limit check is not enabled.
Maximum number of concurrent requests
Description
You can use the max_concurrent_query_count parameter in _resource_limit_spec to configure the maximum number of concurrent requests.
Value
We recommend that you do not set it to a value greater than 5000.
Configuration method
When a cluster starts, set the startup parameter _resource_limit_spec and enable resource limit check (_enable_resource_limit_spec). By default, the resource limit check is not enabled.
Number of worker threads
Description
You can use the cpu_count and workers_per_cpu_quota parameters to configure the number of worker threads.
Value
cpu_count: For an environment with 64 GB of memory, we recommend that you set it to a value between 16 and 32.workers_per_cpu_quota: For an environment with 64 GB of memory, we recommend that you set it to10.
Configuration method
When a cluster starts, set the startup parameters cpu_count and workers_per_cpu_quota.
Parameter configuration example
The following example describes how to set the parameters by configuring startup options when a cluster starts:
[admin@hostname oceanbase]$./bin/observer -i eth0 -p 2881 -P 2882 -n test2 -z zone1 -d /home/admin/oceanbase/store/test2 -l info -o'rootservice_list=172.30.135.203:2882:2881,\
config_additional_dir=/data/1/test2/etc2,/data/1/test2/etc3,cluster_id=11,stack_size=1M,__easy_memory_limit=4G,\
_max_partition_cnt_per_server=10000,\
cpu_count=16,\
workers_per_cpu_quota=10'
Options:
-pspecifies the port number for direct connection.-Pspecifies the RPC port number.-nspecifies the cluster name.-zspecifies the zone to start.-dspecifies the storage directory of data.-zspecifies the level of logs to be printed.-ospecifies the RootService list to start.
For more information about deploying an OceanBase cluster, see Deployment introduction.