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

reduce buffer size of "unused" side of socket #4313

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gregcusack
Copy link

Follow Up to PR: #3929

Problem

We allocate large send and receive buffers for all sockets. However, not all sockets read and write equally from/to their buffers. In fact, 6 sockets are primarily Read and 2 are primarily Write. Meaning we are allocating memory that is never used.

Summary of Changes

  1. TPU write side of sockets are only QUIC control traffic. Set buffer size to 4 MB
  2. Broadcast and Repair read side of sockets are only QUIC control traffic. Set buffer size to $ MB

Services/Sockets
Read/Write

Gossip
RPC - TCP
Ip_echo - TCP
Tvu
tvu_quic
Repair
Repair_quic
Serve_repair
Serve_repair_quic
Ancestor_hashes_requests_quic
Ancestor_hashes_requests
Primarily Read

Tpu
Tpu_forwards
Tpu_vote
Tpu_quic
Tpu_forwards_quic
Tpu_vote_quic
Primarily Write

Retransmitter
Broadcast

Follow Up PR:

  1. Make better sizing decisions for the sockets that don't need a full 128MB buffer

@gregcusack gregcusack force-pushed the reduce-net-buffer-sizes branch 2 times, most recently from 85a196a to e62193f Compare January 7, 2025 21:09
@gregcusack gregcusack marked this pull request as ready for review January 7, 2025 22:37
@gregcusack gregcusack requested a review from steviez January 8, 2025 00:16
@gregcusack gregcusack requested review from steviez and alexpyattaev and removed request for steviez March 13, 2025 16:33
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, this one slipped through the cracks. I doubt it will make any difference, but can you please rebase to tip as a precaution. I'm guessing your branch is on two-month-old-tip-of-master right now

@gregcusack gregcusack force-pushed the reduce-net-buffer-sizes branch from e62193f to 83a9a82 Compare March 13, 2025 19:07
@gregcusack
Copy link
Author

Ahh, this one slipped through the cracks. I doubt it will make any difference, but can you please rebase to tip as a precaution. I'm guessing your branch is on two-month-old-tip-of-master right now

rebased!

@gregcusack gregcusack requested a review from steviez March 13, 2025 19:09
Copy link

@alexpyattaev alexpyattaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing on unstaked mnb node does not reveal any adverse impacts. will start on testnet, if all goes well I'll merge it in the morning.

Copy link

@alexpyattaev alexpyattaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok tested on staked node, TPU works fine, LGTM!

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