Reputation: 73
I am working on a high-performance TCP server, and I see the server not processing fast enough on and off when I pump high traffic using a TCP client. Upon close inspection, I see spikes in "delta time" on the TCP server. And, I see the server sending an ACK and 0.8 seconds later sending PSH,ACK for the same seqno. I am seeing this pattern multiple times in the pcap. Can experts comment on why the server is sending an ACK followed by a PSH,ACK with a delay in between?
Upvotes: 7
Views: 32895
Reputation: 1021
To simplify what ACK
and PSH
means
ACK
will always be present, it simply informs the client what was the last received byte by the server.PSH
tells the client/server to push the bytes to the application layer (the bytes forms a full message).The usual scenario you are used to, is more or less the following:
PSH,ACK
Now imagine those scenarios:
step 4 does not happen (application does not write back any data, or takes too long to write it)
=> OS acknowledge the reception with just an ACK
(the packet will not have any data in it), if the application decides later on to send something, it will be sent with PSH,ACK
.
the message/data sent by the server is too big to fit in one packet:
PSH
flag, and will only have the ACK
flagPSH,ACK
, to inform the end of the message.Upvotes: 6