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 configurations of a server 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 | We recommend that you use EXT4 or XFS. |
sys tenant memory
Description
The minimum memory recommended is 16 GB. We recommend that you set the memory available for the sys tenant to 2 GB.
Recommended configuration
2G is recommended.
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 configuration
6G 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.
Recommended configuration
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_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 configuration
4G is recommended.
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 configuration
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 configuration
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 configuration
cpu_count: For an environment with a 16 GB memory, we recommend that you set it to a value between 16 and 32.workers_per_cpu_quota: For an environment with a 16 GB 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 parameters 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'
The parameters are described as follows:
-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 startup parameter.