Skip to content

Commit

Permalink
fix 16849
Browse files Browse the repository at this point in the history
  • Loading branch information
SbloodyS committed Nov 28, 2024
1 parent 8bec503 commit 037519a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
7 changes: 1 addition & 6 deletions docs/docs/en/architecture/load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ Each worker has two weights parameters, weight (which remains constant after war
This algorithm reports its own load information to the registry at regular intervals. Make decision on two main pieces of information:

- load average (default is the number of CPU cores * 2)
- available physical memory (default is 0.3, in G)
- available physical memory (default is 70%, in percentage)

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)

9 changes: 2 additions & 7 deletions docs/docs/zh/architecture/load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ eg:master.host.selector=random(不区分大小写)

该算法每隔一段时间会向注册中心上报自己的负载信息。我们主要根据两个信息来进行判断

* load 平均值(默认是 CPU 核数 *2)
* 可用物理内存(默认是 0.3,单位是 G
* load 平均值(默认是 CPU 核数 * 2)
* 可用物理内存(默认是 70%,单位是百分比

如果两者任何一个低于配置项,那么这台 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服务才能被派发任务,单位为百分比)

0 comments on commit 037519a

Please sign in to comment.