Browse Source

[Fix-16849] load-balance configuration documentation description issue (#16851)

* fix 16849

* fix 16849

---------

Co-authored-by: Gallardot <gallardot@apache.org>
dev
xiangzihao 4 weeks ago committed by GitHub
parent
commit
7232a20bd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      docs/docs/en/architecture/load-balance.md
  2. 12
      docs/docs/zh/architecture/load-balance.md

10
docs/docs/en/architecture/load-balance.md

@ -46,15 +46,7 @@ Each worker has two weights parameters, weight (which remains constant after war
### Linear Weighting (Default Algorithm) ### Linear Weighting (Default Algorithm)
This algorithm reports its own load information to the registry at regular intervals. Make decision on two main pieces of information: This algorithm reports its own load information to the registry at regular intervals. We mainly judge by CPU usage, memory usage and worker slot usage.
- load average (default is the number of CPU cores * 2)
- available physical memory (default is 0.3, in G)
If either of these is lower than the configured item, then this worker will not participate in the load. (no traffic will be allocated) If either of these is lower than the configured item, then this worker will not participate in the load. (no traffic will be allocated)
You can customise the configuration by changing the following properties in worker.properties
- worker.max.cpu.load.avg=-1 (worker max cpu load avg, only higher than the system cpu load average, worker server can be dispatched tasks. default value -1: the number of cpu cores * 2)
- worker.reserved.memory=0.3 (worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is percentage)

12
docs/docs/zh/architecture/load-balance.md

@ -46,15 +46,7 @@ eg:master.host.selector=random(不区分大小写)
#### 线性加权(默认算法) #### 线性加权(默认算法)
该算法每隔一段时间会向注册中心上报自己的负载信息。我们主要根据两个信息来进行判断 该算法每隔一段时间会向注册中心上报自己的负载信息。我们主要根据CPU使用率、内存使用率以及 worker slot 使用情况来进行判断
* load 平均值(默认是 CPU 核数 *2) 如果任何一个低于配置项,那么这台 worker 将不参与负载。(即不分配流量)
* 可用物理内存(默认是 0.3,单位是 G)
如果两者任何一个低于配置项,那么这台 worker 将不参与负载。(即不分配流量)
你可以在 worker.properties 修改下面的属性来自定义配置
* worker.max.cpu.load.avg=-1 (worker最大cpu load均值,只有高于系统cpu load均值时,worker服务才能被派发任务. 默认值为-1: cpu cores * 2)
* worker.reserved.memory=0.3 (worker预留内存,只有低于系统可用内存时,worker服务才能被派发任务,单位为百分比)

Loading…
Cancel
Save