httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Mizrahi <smizr...@v3d.fr>
Subject Increase rwnd size
Date Tue, 02 Jun 2020 08:22:27 GMT
Hi Apache teams,

In my httpd module, I would like to increase the receive window (rwnd) size.
For some mysterious reasons, if I set a value greater than 4 Mb, the rwnd stucks to 4193 Kb.

Here is my investigation states :

  *   This is for upload (client uploads to httpd)
  *   The correct TCP options are enabled on the server
  *   I got another homemade app on the same server and the rwnd can go up to 8 Mb - so this
exclude the server
  *   The sizeof(int) is 4 bytes

Ton increase receive window size, I do :
int opt = 5000000;
if (setsockopt(this->mSocket, SOL_SOCKET, SO_RCVBUF, &opt, sizeof(opt)) < 0) {
throw invalid_argument(string(CLASSNAME) + " Could not set SO_RCVBUF option : " + string(strerror(errno)));
}

I can check the window size status using getsockopt, and values are correct at the beginning
and at the end of the upload.
In wireshark, I can see this :

Frame 36818: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: XXXXX, Dst: YYYYY
Internet Protocol Version 4, Src: XXXXX, Dst: YYYYY
Transmission Control Protocol, Src Port: 8443, Dst Port: 65168, Seq: 6136, Ack: 31241018,
Len: 0
Source Port: 8443
Destination Port: 65168
[Stream index: 0]
[TCP Segment Len: 0]
Sequence number: 6136 (relative sequence number)
[Next sequence number: 6136 (relative sequence number)]
Acknowledgment number: 31241018 (relative ack number)
1000 .... = Header Length: 32 bytes (8)
Flags: 0x010 (ACK)
Window size value: 4095
[Calculated window size: 4193280]
[Window size scaling factor: 1024]
Checksum: 0x048c [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
[SEQ/ACK analysis]
[Timestamps]

Does a specific mechanism in Apache cause this behaviour ?

Thanks a lot for helping.

Seb.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message