当前位置:网站首页>Modify TCP timestamp to optimize transmission performance
Modify TCP timestamp to optimize transmission performance
2022-07-04 06:33:00 【dog250】
TCP Unilateral optimization is CDN Great taboo , But I can't help but say . Conventional unilateral optimization enables CDN The server , But for scenes such as client upload , This will make it impossible . What do I do ?
It can be modified at the receiving end for uploading data And ack The timestamp , In order to reduce the rtt, Finally reduce its TLP,RTO,RACK etc. timer Timeout time , The goal is to trigger retransmission as quickly as possible . The practice is briefly described as follows .
- When TCP The sender sends data, Will do the following assignment :
data.TSval = $now + delta - When TCP The receiving end pairs data reply ack, Will do the following assignment :
ack.TSecr = data.TSval - When TCP The sender receives ack, Instantaneous... Will be calculated iRTT:
iRTT = $now + delta - ack.TSecr - TCP The sender then uses iRTT Calculation sRTT And each timer Timeout time .
From the above process, we can see , If you add ack.TSecr, It will reduce iRTT, As for how to increase ack.TSecr And how much more , This is what the server as the receiving end should do .
To ensure ack.TSecr It will not exceed the sending end $now + delta, The receiver needs to know the real sRTT, For one-way transmission ,rcv_rtt It's not believable , The receiving end needs to actively send the carrier SYN Flag message to detect , According to the following :
RFC 5961 4.2: If the SYN bit is set, irrespective of the sequence number, TCP MUST send an ACK (also referred to as challenge ACK) to the remote peer.
Record what the receiver gets RTT by rRTT, Take the following example (1/4 Adjustable ) Calculate and assign :
ack.TSecr = data.TSval + 1/4*rRTT
In this way, things can be done .
The impact of this on the sender is as follows :
- The sending end runs Reno/BIC/CUBIC, Yes cc No influence , Just optimize TLP/RTO/RACK.
- The sending end runs BBR, Except optimization TLP/RTO/RACK Outside , You can also cancel ProbeRTT avoid inflight Reduced to 4, It can also affect minRTT Acquisition timing , The risk is to cwnd The impact is negative , watch out cwnd limited.
- The sender runs other cc, Unknown .
about Reno family (Reno/BIC/CUBIC),AIMD Not directly used RTT The number , So reduce RTT Yes AI Process of cwnd No influence , But for the BBR, But there are interesting idea.
BBR( At least Linux Realization ) Not with RTT Participate in calculation delivery rate, But manage it by yourself , So change RTT Pair acquisition delivery rate No influence , meanwhile BBR use minRTT Calculation BDP And then we derive cwnd, So change RTT May change cwnd, The reduction was described earlier RTT Then what is it , But worry about reducing RTT Will compress cwnd, Why not increase RTT, Only twice or more 10s The cycle is reduced once RTT Help the sender collect once minRTT, This does not affect the sender pacing rate Calculation , It can also be increased in most cases cwnd, It is a good strategy to promote radical transmission at the sending end .
It's done , Crack a new topic , A little explanation TCP The form of timestamps .
TCP Timestamps use independent relative times , And if necessary, add something unknown to the opposite end delta, Here's why :
- There is no need to synchronize the time at both ends , Each can calculate RTT.
- Random delta It can avoid peer guessing the local time .
The first point is to get rid of the synchronization constraint , Focus on the second point .
If you directly take the startup time as the timestamp , Even if the opposite end knows ? how :
- How long the machine hasn't been restarted will be exposed , If there are kernel security updates during , The opposite end knows that the machine is not patch.
- Native characters will be exposed , If on 180 God , Probably the server , If less than a day , Then for PC, Mobile phones can also guess .
- if PC or mobile phone , The opposite end can detect the owner's living habits , For example, at midnight , In the morning .
- Oh …
so, Initialize different random for each connection delta, The goal is not to talk to strangers .
Zhejiang Wenzhou leather shoes wet , It's not fat when it's raining .
边栏推荐
- Variables d'environnement personnalisées uniapp
- QT get random color value and set label background color code
- buuctf-pwn write-ups (8)
- 金盾视频播放器拦截的软件关键词和进程信息
- Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
- Tf/pytorch/cafe-cv/nlp/ audio - practical demonstration of full ecosystem CPU deployment - Intel openvino tool suite course summary (Part 2)
- How to implement cross domain requests
- Functions in C language (detailed explanation)
- [Chongqing Guangdong education] electronic circuit homework question bank of RTVU secondary school
- Sort list tool class, which can sort strings
猜你喜欢

实用的小工具指令

Review | categories and mechanisms of action of covid-19 neutralizing antibodies and small molecule drugs

740. Delete and get points

Abap:ooalv realizes the function of adding, deleting, modifying and checking

C语言练习题(递归)

报错cvc-complex-type.2.4.a: 发现了以元素 ‘base-extension‘ 开头的无效内容。应以 ‘{layoutlib}‘ 之一开头。

Detectron: train your own data set -- convert your own data format to coco format

Weekly summary (*63): about positive energy

Notes and notes

How to choose the middle-aged crisis of the testing post? Stick to it or find another way out? See below
随机推荐
微信小程序使用rich-text中图片宽度超出问题
lightroom 导入图片灰色/黑色矩形 多显示器
InputStream/OutputStream(文件的输入输出)
Appium foundation - appium installation (II)
Arcpy 利用updatelayer函数改变图层的符号系统
Is the insurance annuity product worth buying? Is there a hole?
Considerations for testing a website
C语言中的排序,实现从小到大的数字排序法
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
【无标题】
2022.7.2-----leetcode. eight hundred and seventy-one
Yiwen unlocks Huawei's new cloud skills - the whole process of aiot development [device access - ESP end-to-side data collection [mqtt]- real time data analysis] (step-by-step screenshot is more detai
Functions in C language (detailed explanation)
C language exercises (recursion)
QT get random color value and set label background color code
ADC voltage calculation of STM32 single chip microcomputer
[Chongqing Guangdong education] electronic circuit homework question bank of RTVU secondary school
How to help others effectively
MySQL learning notes 3 - JDBC
QT QTableWidget 表格列置顶需求的思路和代码