This topic provides reference minimum resource configurations by taking the minimum hardware configurations of a server as an example.
Minimum hardware configurations of a server
The following table lists the minimum configurations of a server based on production standards.
| Server configuration | Description |
|---|---|
| Server quantity | 3 |
| CPU | 4 cores |
| Memory | 16 GB |
| Disk | We recommend that you use SSDs with a space of 1 TB or over 4 times the memory size. |
| 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 | We recommend that you use EXT4 or XFS. |
sys tenant memory
Description
We recommend that you set memory_size in sys_unit_config of the sys tenant to 2 GB when the server is configured with the recommended minimum memory of 16 GB.
Recommended value
2G
Configuration method
Execute the following statement:
obclient> ALTER RESOURCE UNIT sys_unit_config MEMORY_SIZE='2G';
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.
Recommended value
6G
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.
Recommended value
512K, which is the default value in OceanBase Database V4.x. We recommend that you do not modify stack_size.
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_xx format, which means that it is a hidden parameter and cannot be queried by using the SHOW PARAMETERS statement. 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';
Recommended value
4G
Configuration method
Set the startup parameter __easy_memory_limit 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.
Recommended 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.
Recommended 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.
Recommended value
cpu_count: For an environment with 16 GB of memory, we recommend that you set it to a value between 16 and 32.workers_per_cpu_quota: For an environment with 16 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=xx.xx.xx.xx:2882:2881,\
config_additional_dir=/data/1/test2/etc2,/data/1/test2/etc3,cluster_id=11,stack_size=1M,__easy_memory_limit=4G,\
cpu_count=16,\
workers_per_cpu_quota=10'
where
-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.