-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Adding configurabele TCP buffers and minor hafixes #4649
Conversation
d73ca5b
to
3fdc778
Compare
3fdc778
to
695cb39
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9e12c21
to
642b330
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
642b330
to
ccd0b25
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @Markuze
@@ -51,6 +51,10 @@ pub const MAX_MESSAGE_SIZE: usize = 64 * 1024 * 1024; /* 64 MiB */ | |||
pub const CONNECTION_BACKOFF_BASE: u64 = 2; | |||
pub const IP_BYTE_BUCKET_RATE: usize = 102400 /* 100 KiB */; | |||
pub const IP_BYTE_BUCKET_SIZE: usize = IP_BYTE_BUCKET_RATE; | |||
pub const INBOUND_TCP_RX_BUFFER_SIZE: u32 = 3 * 1024 * 1024; // 3MB ~6MB/s with 500ms latency | |||
pub const INBOUND_TCP_TX_BUFFER_SIZE: u32 = 512 * 1024; // 1MB use a bigger spoon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a technical term, or just informal wording? use a bigger spoon
😄 Not sure how to respond based on the comment lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Informal but descriptive.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
I merged this forcibly because the smoke tests were broken in CI, the test passed locally
|
listener.set_nonblocking(true)?; | ||
let listener = TcpListener::try_from(listener)?; | ||
let addr = SocketAddr::new(ipaddr, port); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we change this to not set_nonblocking?
) ### Description This was done within `TcpListener.bind()` before #4649.
### Description Tests show that overriding the socket options for send and recv buffer actually hurts performance (even with default linux kernel settings). Logically, this rolls back #4649 but keeping the configs and code around in case this or other socket options are revisited. ### Test Plan New results: * `net_bench_two_region_env`: 800 KB/s -> 4 MB/s * `pfn_performance_with_realistic_env`: 4K -> 6K TPS
Tests show that overriding the socket options for send and recv buffer actually hurts performance (even with default linux kernel settings). Logically, this rolls back #4649 but keeping the configs and code around in case this or other socket options are revisited. New results: * `net_bench_two_region_env`: 800 KB/s -> 4 MB/s * `pfn_performance_with_realistic_env`: 4K -> 6K TPS
…0775) Tests show that overriding the socket options for send and recv buffer actually hurts performance (even with default linux kernel settings). Logically, this rolls back #4649 but keeping the configs and code around in case this or other socket options are revisited. New results: * `net_bench_two_region_env`: 800 KB/s -> 4 MB/s * `pfn_performance_with_realistic_env`: 4K -> 6K TPS
Adding configurable TCP buffers for inbound and outbound TCP connections.
This change will improve networking performance, especially for long RTT connections.
Description
Test Plan
This change is