oceanbase / obdeploy

A deployer and package manager for OceanBase open-source software.
https://open.oceanbase.com
GNU General Public License v3.0
89 stars 133 forks source link

[Enhancement]: autodeploy doesn't make full use of the hardware resource. #152

Closed longdafeng closed 4 months ago

longdafeng commented 1 year ago

Check Before Asking

Environment

In the ECS: 32C 128G Memory, 500G essd 

    devname: eth0
    # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    # mysql_port: 2881
    # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    # rpc_port: 2882
    # Defines the zone for an observer. The default value is zone1.
    # zone: zone1
    # The maximum running memory for an observer. When ignored, autodeploy calculates this value based on the current server available resource.
    memory_limit: 115G
    # The percentage of the maximum available memory to the total memory. This value takes effect only when memory_limit is 0. The default value is 80.
    # memory_limit_percentage: 80
    # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G. Autodeploy calculates this value based on the current server available resource.
    # system_memory: 22G
    # The size of a data file. When ignored, autodeploy calculates this value based on the current server available resource.
    datafile_size: 200G
    # The size of disk space used by the clog files. When ignored, autodeploy calculates this value based on the current server available resource.
    log_disk_size: 66G
    # System log level. The default value is INFO.
    # syslog_level: INFO
    # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true. The default value for autodeploy mode is false.
    enable_syslog_wf: true
    # Enable auto system log recycling or not. The default value is false. The default value for autodeploy mode is on.
    enable_syslog_recycle: true
    # The maximum number of reserved log files before enabling auto recycling. When set to 0, no logs are deleted. The default value for autodeploy mode is 4.
    # max_syslog_file_count: 4
    # Cluster name for OceanBase Database. The default value is obcluster. When you deploy OceanBase Database and obproxy, this value must be the same as the cluster_name for obproxy.
    # appname: obcluster
    # Password for root. The default value is empty.
    # root_password:
    # Password for proxyro. proxyro_password must be the same as observer_sys_password. The default value is empty.
    # proxyro_password:

but after install the cluster, the server's resource is as following:

mysql> SELECT * FROM oceanbase.GV$OB_SERVERS;
+---------------+----------+-------+----------+--------------+------------------+--------------+------------------+--------------+--------------+-------------------+-------------------+-----------------+--------------------+------------------+-------------------------+--------------+-------------------------+-----------------------+
| SVR_IP        | SVR_PORT | ZONE  | SQL_PORT | CPU_CAPACITY | CPU_CAPACITY_MAX | CPU_ASSIGNED | CPU_ASSIGNED_MAX | MEM_CAPACITY | MEM_ASSIGNED | LOG_DISK_CAPACITY | LOG_DISK_ASSIGNED | LOG_DISK_IN_USE | DATA_DISK_CAPACITY | DATA_DISK_IN_USE | DATA_DISK_HEALTH_STATUS | MEMORY_LIMIT | DATA_DISK_ABNORMAL_TIME | SSL_CERT_EXPIRED_TIME |
+---------------+----------+-------+----------+--------------+------------------+--------------+------------------+--------------+--------------+-------------------+-------------------+-----------------+--------------------+------------------+-------------------------+--------------+-------------------------+-----------------------+
| 172.30.62.249 |     2882 | zone1 |     2881 |           30 |               30 |           30 |               30 |  74088185856 |  74088185856 |       70866960384 |       70866960384 |       536870912 |       214748364800 |        469762048 | NORMAL                  | 123480309760 | NULL                    | NULL                  |
+---------------+----------+-------+----------+--------------+------------------+--------------+------------------+--------------+--------------+-------------------+-------------------+-----------------+--------------------+------------------+-------------------------+--------------+-------------------------+-----------------------+
1 row in set (0.04 sec)

The memory capacity is lower than expected.



### Fast Reproduce Steps

as before

### Actual Behavior

as before

### Expected Behavior

_No response_

### Other Information

_No response_
gys-git commented 4 months ago

You can add ‘production_mode: True’ in the configuration, or select "Maximized Deployment" through OBD web to fully utilize the hardware resources.