Skip to content

How to limit libp2p memory usage? #4572

Answered by mxinden
Wiezzel asked this question in Q&A
Sep 28, 2023 · 3 comments · 17 replies
Discussion options

You must be logged in to vote

I see two solutions:

  1. Front or tail drop in EnabledHandler once send_queue reaches a certain size.
  2. Implement backpressure between Gossipsubs NetworkBehaviour and ConnectionHandler and only forward from NetworkBehaviour to ConnectionHandler when the latter can handle another message. I.e. drop messages for a specific peer in NetworkBehaviour instead of as suggested in (1) in ConnectionHandler.

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
2 replies
@Wiezzel
Comment options

@Wiezzel
Comment options

Comment options

You must be logged in to vote
13 replies
@Wiezzel
Comment options

@thomaseizinger
Comment options

@Wiezzel
Comment options

@mxinden
Comment options

Answer selected by Wiezzel
Comment options

You must be logged in to vote
2 replies
@Wiezzel
Comment options

@Wiezzel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants