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

Question about TCP Prague in socket programming #18

Open
Jason-lmx opened this issue May 12, 2023 · 5 comments
Open

Question about TCP Prague in socket programming #18

Jason-lmx opened this issue May 12, 2023 · 5 comments

Comments

@Jason-lmx
Copy link

I want to set a flow to ECT(1) as low-latency traffic.
So I would like to know if I can selectively use TCP Prague as a congestion control method in socket programming, what parameters can be set, and how to set them.
Looking forward to your reply.

@minuscat
Copy link
Collaborator

minuscat commented May 13, 2023

To do this, make sure to use congestion control that supports ECT(1) traffic on the sender (e.g., TCP-Prague) and set the proper tcp_ecn parameter on both sender and receiver. Taking TCP-Prague as an example,

On the sender side, configure Prague congestion control and tcp_ecn:

sysctl -w net.ipv4.tcp_congestion_control=Prague
sysctl -w net.ipv4.tcp_ecn=3

On the client side, configure tcp_ecn:

sysctl -w net.ipv4.tcp_ecn=3

If above configuration is not doable, make sure you already load the module.

@Jason-lmx
Copy link
Author

I am very interest in testing L4S in my network. I am trying to understand how it affects the terminals.
"sysctl" seems to be a global behavior. Does TCP prague support customizing the parameters of a single flow,except ‘ecn’ ?

Also, I would like to know how QUIC supports BBRv2 and L4S, any suggestions are welcome.

@minuscat
Copy link
Collaborator

Indeed, sysctl is a global behaviour. But if you run your L4S in the network namespace it will not affect the root namespace.
Not sure about your meaning for "customising the parameters of a single flow", but if your goal is to test L4S without modifying all your current setup, the simplest way is to run the application using namespace or even use dedicated machines with Prague kernel.

Related to QUIC support L4S, AFAIK from the thread (https://developer.apple.com/forums/thread/720486), the QUIC can support L4S under Developer setting. But related QUIC support BBRv2, I am not aware on that.

@Jason-lmx
Copy link
Author

I mean could I set some parameters of TCP prague in SOCKET, such as rtt_target.
Also,May I ask when a congestion event is detected, how does the sender adjust the congestion window? What is the difference between ‘prague_enter_loss’ and 'prague_enter_cwr'?Why did you use ‘prague_classic_ecn_fallback’ to update alpha?

@minuscat
Copy link
Collaborator

  1. You can use the following two commands to see the meaning of TCP Prague module parameters and their current values, but if you want to change then you need to reload the module parameters with the parameters.
    modinfo tcp_prague systool -vm tcp_prague
  2. If you are asking the ACCECN (I assume) the sender adjust the congestion window based on the ECN Echo feedback in TCP ack to adjust.
  3. The enter_loss and enter_cwr are used respectively for TCP_CA_Recovery (means when packets are re-transmitted) and TCP_CA_CWR (means when congestion window reduced)
  4. Finally, the prague_classic_ecn_fallback is used when the TCP Prague is configured to detect & fallback for classic ECN, but this mode is not used as default right now.

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

No branches or pull requests

2 participants