User25
User25

Reputation: 15

Effects of packet duplication

Am using TCP to transfer data. Here I would like to analyze the system's performance to various Network behaviors. I am using Netem tool to produce packet delay, loss, reorder and duplication.

I could visualize that system's performance degrades with increase in Delay, Loss and Reorder. i.e., It takes extra time for retransmitting the Packets. But for duplication there is no significant change in the performance. Wireshark logs show that packet duplication is happening.

307328 266.723146 192.168.1.8 192.168.1.3 TCP 78 [TCP Dup ACK 307327#1] 44812 > http [ACK] Seq=149 Ack=3188408 Win=522880 Len=0 TSval=261765 TSecr=83169437 SLE=3186960 SRE=3188408

I can understand that packet duplication is handled in TCP layer where it can discard the duplicated packets. I would like to know whether this process of receiving and discarding the duplicated packets will affect the system's performance [i.e., Will it introduce any time lag]?

Upvotes: 1

Views: 908

Answers (1)

childofsoong
childofsoong

Reputation: 1936

Will it introduce some lag? Maybe... but probably nothing noticeable.

Once your machine receives the first copy of a TCP packet, it ignores the rest. Now, this can happen in software, which would cause a very minor delay for your CPU to interpret the packet, and decide to throw it out, but I believe that nowadays it's going to happen at the hardware level, and your CPU won't notice a thing. That's not to say there won't be any effect at all - you're using up network bandwidth to receive that duplicated packet, so if you're seeing a TON of duplication, you may notice an effective drop in bandwidth. However, in most cases, this should be minor.

If you're using a halfway decent TCP socket library, it should simply be providing you with a data stream (probably in a byte buffer) of as much data as has been received in order. Now, if a braindead monkey wrote your library (and by that I mean it's not actually following the spec for TCP) then you might see copied data in your stream. However, I'm going to assume that's not the case, and so the only really noticeable effect will be in the form of wasted bandwidth.

Upvotes: 2

Related Questions