-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(jetsocat,dgw): rework flow control algorithm (#977)
Replace the old naive flow control algorithm. The new algorithm is much more fair, and considerably reduce the number of WindowAdjust messages exchanged. The idea is to send WindowAdjust messages only when the scheduler is idle, and focus on handling active connections as fast as possible without sending any WindowAdjust message when it is busy. Before this patch, single connection: > 0.0000-15.5887 sec 34.4 GBytes 18.9 Gbits/sec After this patch + maximum message size of 4 kB, single connection: > 0.0000-10.0490 sec 23.0 GBytes 19.7 Gbits/sec Improvement of 4.2%. This patch + maximum message size of 16 kB, single connection: > 0.0000-10.0393 sec 30.6 GBytes 26.2 Gbits/sec Improvement of 38.6%. Before this patch, 10 parallel connections: > [ ID] Interval Transfer Bandwidth > [ 3] 0.0000-20.0677 sec 555 MBytes 232 Mbits/sec > [ 9] 0.0000-20.0704 sec 3.89 GBytes 1.67 Gbits/sec > [ 2] 0.0000-20.0703 sec 3.62 GBytes 1.55 Gbits/sec > [ 4] 0.0000-20.0693 sec 3.91 GBytes 1.67 Gbits/sec > [ 10] 0.0000-20.0659 sec 3.43 GBytes 1.47 Gbits/sec > [ 5] 0.0000-20.0651 sec 2.73 GBytes 1.17 Gbits/sec > [ 8] 0.0000-20.0704 sec 3.83 GBytes 1.64 Gbits/sec > [ 7] 0.0000-20.0692 sec 3.37 GBytes 1.44 Gbits/sec > [ 1] 0.0000-20.0692 sec 3.61 GBytes 1.54 Gbits/sec > [ 6] 0.0000-20.2801 sec 455 MBytes 188 Mbits/sec > [SUM] 0.0000-20.2810 sec 29.4 GBytes 12.4 Gbits/sec Notice how some connections are considerably slower. After this patch + maximum message size of 4 kB, 10 parallel connections: > [ 8] 0.0000-10.3368 sec 1.88 GBytes 1.56 Gbits/sec > [ 10] 0.0000-10.3377 sec 1.87 GBytes 1.55 Gbits/sec > [ 1] 0.0000-10.3642 sec 1.87 GBytes 1.55 Gbits/sec > [ 5] 0.0000-10.3640 sec 1.86 GBytes 1.54 Gbits/sec > [ 2] 0.0000-10.3640 sec 1.85 GBytes 1.54 Gbits/sec > [ 4] 0.0000-10.3650 sec 1.85 GBytes 1.54 Gbits/sec > [ 3] 0.0000-10.3641 sec 1.85 GBytes 1.54 Gbits/sec > [ 9] 0.0000-10.3646 sec 1.90 GBytes 1.58 Gbits/sec > [ 6] 0.0000-10.3652 sec 1.85 GBytes 1.54 Gbits/sec > [ 7] 0.0000-10.3800 sec 1.87 GBytes 1.55 Gbits/sec > [SUM] 0.0000-10.3812 sec 18.7 GBytes 15.4 Gbits/sec Improvement of 24.1%. Also notice how all connections are transferring roughly the same amount of bytes. Issue: DGW-202
- Loading branch information
Showing
3 changed files
with
79 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters