Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: revert yamux buffer #281

Merged
merged 1 commit into from
Dec 1, 2020
Merged

revert: revert yamux buffer #281

merged 1 commit into from
Dec 1, 2020

Conversation

driftluo
Copy link
Collaborator

@driftluo driftluo commented Nov 30, 2020

The throughput problem reappeared because of this commit 1ea53e9

test case: #213

Although in actual production there will be no sub-substreams above 100 levels, this is indeed a problem. After regression testing, the current code will show a significant throughput drop when it is around 800.

perf ./target/release/examples/throughput_test 800

master branch: CPU consumption of distribute_to_substream function accounts for more than 50%
patch branch: CPU consumption problem of distribute_to_substream function cannot be clearly observed, about 2.5%

This is a classic continuous memory and segmented memory overhead problem. In a test scenario under full pressure, such memory issues will be triggered frequently and cause huge overhead.

@driftluo driftluo requested review from a team and zhangsoledad November 30, 2020 09:17
@yangby-cryptape
Copy link

The throughput problem reappeared because of this commit 1ea53e9

I want to request changes for 1ea53e9: .fold(0, |acc, item| acc + item.len()) => .map(HashMap::len).sum()

@driftluo driftluo merged commit f9be77c into master Dec 1, 2020
@driftluo driftluo deleted the revert-yamux-buffer branch December 1, 2020 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants