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

Investigate restrict-size performance issue #3862

Closed
twoeths opened this issue Mar 18, 2022 · 5 comments
Closed

Investigate restrict-size performance issue #3862

twoeths opened this issue Mar 18, 2022 · 5 comments
Labels
prio-medium Resolve this some time soon (tm). scope-performance Performance issue and ideas to improve performance.

Comments

@twoeths
Copy link
Contributor

twoeths commented Mar 18, 2022

Describe the bug

  • restrict-size is used in libp2p-mplex, it's pretty simple but takes 4.6% of cpu time

Screen Shot 2022-03-18 at 17 27 00

Screen Shot 2022-03-18 at 17 28 29

0318_contabo_20.cpuprofile.zip

Expected behavior

Should be <1%

@dapplion dapplion added the scope-performance Performance issue and ideas to improve performance. label Mar 21, 2022
@stale
Copy link

stale bot commented Sep 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta-stale label Sep 21, 2022
@dapplion dapplion added the prio-medium Resolve this some time soon (tm). label Sep 29, 2022
@dapplion
Copy link
Contributor

@tuyennhv Could you run the CPU profile again without async stack traces?

@twoeths
Copy link
Contributor Author

twoeths commented Oct 3, 2022

reattaching #4603 (comment) (after libp2p is updated to 0.39.2), this time it shows restrictSize() takes 4%

Screen Shot 2022-10-03 at 08 53 46

Detail

Screen Shot 2022-10-03 at 08 54 10

I disabled async stack trace so there is no async hook there @wemeetagain

Screen Shot 2022-10-03 at 08 52 41

0930_multilined_fastMsgId_lg1k_1.2.0.cpuprofile.zip

@twoeths
Copy link
Contributor Author

twoeths commented Oct 3, 2022

tracked in libp2p/js-libp2p-mplex#205

@dapplion
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-medium Resolve this some time soon (tm). scope-performance Performance issue and ideas to improve performance.
Projects
Status: Done
Development

No branches or pull requests

3 participants