当前位置:网站首页>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 .
边栏推荐
- 2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
- Sword finger offer II 038 Daily temperature
- uniapp 自定義環境變量
- Tf/pytorch/cafe-cv/nlp/ audio - practical demonstration of full ecosystem CPU deployment - Intel openvino tool suite course summary (Part 2)
- Reading notes of Clickhouse principle analysis and Application Practice (4)
- Functions in C language (detailed explanation)
- C language - Blue Bridge Cup - Snake filling
- HMS v1.0 appointment. PHP editid parameter SQL injection vulnerability (cve-2022-25491)
- C # symmetric encryption (AES encryption) ciphertext results generated each time, different ideas, code sharing
- 2022.7.3-----leetcode. five hundred and fifty-six
猜你喜欢
4G wireless all network solar hydrological equipment power monitoring system bms110
C实现贪吃蛇小游戏
C language - Blue Bridge Cup - Snake filling
Appium基础 — APPium安装(二)
27-31. Dependency transitivity, principle
Arcpy uses the updatelayer function to change the symbol system of the layer
Appium foundation - appium installation (II)
Bicolor case
Tree DP
17-18. Dependency scope and life cycle plug-ins
随机推荐
JSON Web Token----JWT和传统session登录认证对比
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
C实现贪吃蛇小游戏
The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
Common JS tool Libraries
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
Manually page the list (parameter list, current page, page size)
ABAP:OOALV实现增删改查功能
Design and implementation of redis 7.0 multi part AOF
Experience weekly report no. 102 (July 4, 2022)
微信小程序使用rich-text中图片宽度超出问题
【问题记录】03 连接MySQL数据库提示:1040 Too many connections
[untitled]
Detectron: train your own data set -- convert your own data format to coco format
QT 获取随机颜色值设置label背景色 代码
Download kicad on Alibaba cloud image station
Leakage detection relay jy82-2p
regular expression
ES6 modularization
C realize Snake games