Help Center/ Huawei Cloud EulerOS/ FAQs/ What Are the Differences Between tcp_rmem Behaviors in HCE 2.0 and Earlier Kernel Versions?
Updated on 2026-02-28 GMT+08:00

What Are the Differences Between tcp_rmem Behaviors in HCE 2.0 and Earlier Kernel Versions?

Symptom

If the HCE kernel is upgraded from a version earlier than 5.10 (for example, 4.18) to a later version, the kernel changes how it processes tcp_rmem. The upper limit of TCP buffer is no longer self-adaptive. Instead, TCP buffer is set by a user-space socket program. If the user-space socket parameter is set to an inappropriate value, the system can still run properly with an older kernel thanks to self-adaptation. However, in later kernel versions, self-adaptation was removed and TCP buffer is determined by the inappropriate value. As a result, the system cannot run properly.

Possible Cause

In an earlier Linux kernel version, for example, 4.18, tcp_fixup_rcvbuf is used to adjust the size of TCP buffer when a TCP connection is established. The upper limit of tcp_rmem can be overwritten if needed to adapt to service requirements. In kernel 5.10, the Linux community simplifies how the size of TCP buffer is calculated. tcp_fixup_rcvbuf is removed to make the entire process simpler and more intuitive. When a TCP connection is established, TCP buffer is adjusted based on the default upper limit of tcp_rmem or the value of the user-space socket parameter.

Solution

Set an appropriate value for the user-space socket parameter to ensure that tcp_rmem can work well.