Tencent TCPA officially released: VPS acceleration strategy claimed to be better than Google BBR

888u

Last update at :2024-03-04,Edit by888u

Yesterday, Tencent TCPA was officially released, and webmasters, individuals, and enterprises can use it for free. TCPA is an acceleration strategy used internally by Tencent Cloud. It optimizes the parameters and code logic of the TCP protocol stack and claims to have better acceleration effects than Google BBR. It is now open source. This article introduces what TCPA is and how to install TCPA and enable TCPA acceleration.

Introduction to TCPA

TCPA is a unilateral congestion algorithm used internally by Tencent. It optimizes the parameters and code logic layer of the TCP protocol stack to achieve a fast client access experience.

This is TCPA, the processing logic diagram after sending a data packet and receiving a response packet. A total of 9 modules are included. After the application program sends the data through sendfile, write, etc., it is handed over to the kernel's data packet building module for processing, and finally each SKB is generated and placed in the sending queue. The gentle sending module gently sends these data (whether new data or retransmitted data) to the network according to the sending speed/sending window value generated by the congestion control module. It does not itself decide the sending rate, but only Perform at given speed/send window. The timeout module is used to decide which data packets have timed out and retransmit them, and will eventually be handed over to the gentle sending module for sending. The Probe detection module constructs some data packets to detect the quality of the network based on the specific needs of the network. The sending is handed over to the gentle sending module, and the received response packet will be handed over to the Probe module for processing. After receiving the response packet, if there is a SACK, the SACK is processed separately. The processing logic of the SACK is relatively complex. It is necessary to know which data packets have been responded to and which have not been responded to, and the retransmission queue needs to be marked. It will also determine which packets have been lost based on the responses in the sack, changes in RTT values ​​in the current network, etc. This will provide judgment information to the packet loss detection module and congestion control module.

Packet loss detection module is used to determine which data packets have been discarded, such as fast retransmission, RACK and other algorithms. Only discarded packets are marked here, and the specific retransmission is performed by the retransmission packet processing module.

The congestion control algorithm is used to determine the current network link situation and determine the current sending speed and sending window value accordingly. Different congestion algorithms rely on different judgment information. The increase or decrease of windows is judged here. Here we will rely on the SACK module, packet loss detection module, RTO timeout module, probe module, etc. to give key information.

The retransmission data packet module and the new data sending module are relatively simple. After the data is sorted, it is handed over to the gentle sending module for sending.

So, in general, the modification of TCPA is not only a modification of the congestion algorithm, but also a reconstruction of the entire logic of sending and receiving packets. For the existing functions of the system, Tencent also provides an adjustable parameter interface for use. For example, the small table lists some of the adjusted parameters:

net.core.wmem_max = 3276800

net.ipv4.tcp_fack = 0

net.ipv4.tcp_init_cwnd = 10

net.ipv4.tcp_loss_init_cwnd = 1

net.ipv4.tcp_mem = 379479 505972 758958

net.ipv4.tcp_metrics_minrtt = 0

net.ipv4.tcp_rto_max = 120

net.ipv4.tcp_rto_min = 200

net.ipv4.tcp_timestamps = 1

net.ipv4.tcp_wmem = 4096 16384 4194304

Enable TCPA

The following is an introduction to how to enable TCPA acceleration for your VPS.

Download the kernel and TCPA installation package

1. Download the DIY kernel

Link: https://share.weiyun.com/5AeyuFg Password: d1swc1

2. Download the TCPA installation package

Link: https://share.weiyun.com/5RAyh7c Password: qeetzp

Install TCPA

1.Install the kernel

rpm –ivh kernel-3.10.0-693.5.2.tcpa06.tl2.x86_64.rpm reboot //Must be rebooted to take effect.

2. Decompress TCPA

tar jxvf tcpa_packets_180619_1151.tar.bz2 cd tcpa_packets sh install.sh //It will be installed under /usr/local/storage/tcpav2. cd /usr/local/storage/tcpav2

3. Enable TCPA (default only accelerates 3 ports 80, 443, and 8080)

sh start.sh

TCPA acceleration effect

Here are the BoRui test results of TCPA and BBR.

Two OC machines in the same data center, test results of 640KB small files on Borui:

Reference article:

TCPA official announcement

Recommended site searches: dynamic vps instant ip change, foreign free asp space, corporate email, Western Digital registration, European server, which foreign server rental is best, webmaster ip, the cheapest cloud server for Korean virtual host, domain name registration website,

Tencent TCPA officially released: VPS acceleration strategy claimed to be better than Google BBR

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码