-
Notifications
You must be signed in to change notification settings - Fork 0
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
acknowledge timestamp frame manual testing #2
base: sdeng/receiver_timestamps
Are you sure you want to change the base?
acknowledge timestamp frame manual testing #2
Conversation
25a57c1
to
b479235
Compare
.with(EnvFilter::from_default_env()) | ||
.init(); | ||
|
||
let server_addr = "127.0.0.1:20001".parse().unwrap(); |
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.
The server_addr
and client_endpoint
have ports that are impacted by the traffic shaping script.
let (endpoint, server_cert) = make_server_endpoint(server_addr)?; | ||
let endpoint2 = endpoint.clone(); | ||
let handle = tokio::spawn(async move { | ||
let span = trace_span!("SERVER"); |
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.
You could grep for SERVER
or CLIENT
to filter the logs
|
||
// Provided methods | ||
|
||
fn on_ack_packet( |
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.
This controller just wraps the default cubic congestion control. The main difference is that it logs some messages here.
let span = info_span!("[cc] on_ack_packet", "pn" = pn); | ||
let _guard = span.enter(); | ||
if let Some(recv) = received { | ||
info!("~1RTT={}", recv.duration_since(sent).as_millis()); |
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.
The ~1RTT value should be roughly the same value as the delay set in the traffic shaping script. It should be 0 when traffic shaping is disabled and 500 when enabled (unless the value is changed).
if let Some(lp) = self.last_packet.as_ref() { | ||
if let Some(last_recv) = lp.received { | ||
info!( | ||
"receiver interpacket delay = {}", |
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.
The interpacket delay is the time delay between the current packet and the previous packet from the perspective of the peer. This should roughly be the send_interval
on the client side.
Sometimes the value will be 0 if the QUIC packet was sent in the same UDP packet. Or at least thats what I think. I verified this by adding logs on the fn on_sent
method on the congestion controller trait.
@@ -0,0 +1,41 @@ | |||
#!/bin/bash |
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.
This requires sudo
b479235
to
cb6aa05
Compare
cb6aa05
to
ac2b8af
Compare
4a42bec
to
fa004c5
Compare
ac2b8af
to
697a01f
Compare
697a01f
to
406fb73
Compare
Description
This PR contains the code for a rough E2E validation for the work done in quinn-rs#1992.
The focus of this E2E test is to see if the timestamps in the ACK frames are able to give a valid signal to the peer if there are some latency between the two connections.
Disclaimer: this test uses
pnctl
anddnctl
to traffic shape because it's what was available on macos.This test tries to measure 2 values:
and there are two knobs that we can change to impact the measured values
The 0.5RTT value measures roughly the same as the latency added by the traffic shaper. ~0 when traffic shaping is disabled and ~500ms for the default traffic shaping delay in the script.
For the interpacket delay, this is roughly about the interval the sender sends packet to the receiver, which is currently set at 250ms.
Procedure
In terminal 1:
sudo tcpdump -i any dst port 20001
This lets us monitor the packets and size.
In terminal 2:
RUST_LOG=info cargo run --example ack_timestamp_test
This runs the test. You should see output like:
The logs print out the measured values.
In terminal 3:
sudo -i
because traffic shaping needs sudo privilegescd
to the repo./trafficshape.sh delay
will enable the traffic shaper./trafficshape.sh reset
will disable the traffic shaperYou can run
./trafficshape.sh delay|reset
while the test is running to see the change in real time.