Skip to content

Commit

Permalink
docs: improve grammar (#1726)
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-xm authored Jan 16, 2023
1 parent cff1518 commit 37d4dcf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/modules/ngx_http_upstream_vnswrr_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ Enable `vnswrr` load balancing algorithm.
- max_init

The max number of virtual node per initialization, to avoid initializing too many virtual nodes in one request.

In very large clusters, setting this argument can significantly reduce the time overhead of a single request.

There is two another rules of `max_init`:
There are two additional rules of `max_init`:
1. If `max_init` is not set or `0`, it will be adjusted to the number of peers.
2. If `max_init` is greater than total weight of peers, it will be adjusted to the total weight of peers.

Expand Down Expand Up @@ -95,20 +95,20 @@ http {
## Performance


In the same pressure environment (wrk, 500 concurrency, keepalive, 2000 endpoint), the CPU consumption of `VNSWRR` algorithm accounts for `0.27%` ( `ngx_http_upstream_get_vnswrr`).
Under the same pressure (wrk, 500 concurrency, keepalive, 2000 endpoint), the CPU consumption of `VNSWRR` algorithm accounts for `0.27%` ( `ngx_http_upstream_get_vnswrr`).
Compared with `VNSWRR` algorithm, the CPU consumption of `SWRR` (`ngx_http_upstream_get_peer` `39%`) is an order of magnitude higher than `VNSWRR`.


![image](/docs/image/vnswrr_vs_swrr_fhot.png)

In the above environment, the QPS of `VNSWRR` increases by `60%` compared with `SWRR` algorithm.
In the above environment, the QPS of `VNSWRR` increased by `60%` compared with `SWRR` algorithm.


![image](/docs/image/vnswrr_vs_swrr_2000.png)


Observing the changes of QPS and RT in the different back-end number scenarios.
Under SWRR algorithm, when the number of back-end for every 500 addition, then the QPS of Nginx decreases by about 10% and RT increases by about 1 ms. But under the VNSWRR algorithm, QPS and RT do not change much.
Under SWRR algorithm, with every 500 back-end servers added, the QPS of Nginx decreases by about 10% and RT increases by about 1 ms. But under the VNSWRR algorithm, QPS and RT do not change much.


![image](/docs/image/vnswrr_vs_swrr_qps.png)
Expand Down

0 comments on commit 37d4dcf

Please sign in to comment.