3

Some are saying that bigger packets are better to send then smaller.

But in this app: http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/message/messagesegmentation.html

The lower the packet size is, the smaller amount of time it needs to reach the destination. So I don't understand why to prefer bigger size? Can you please explain it to me? Thank you

Giacomo1968
  • 3,553
  • 29
  • 42
exeq
  • 33
  • 1
  • 1
  • 3

4 Answers4

5

There's a lot of things to consider. The important ones are:

MTU

The MTU of a particular medium dictates the size of the largest packet that can be sent down it. Across the Internet this is typically 1500 bytes though this may vary if other technologies such as PPPoA are involved. If data larger than the MTU needs to be sent, the data will be fragmented into multiple packets - this takes time.

Overhead

Everything you transmit has an overhead - typically meta data that describes what you're sending. Sending larger volumes of data at a time reduces this overhead and thus the required network bandwidth.

Failures

Depending on the protocols you are using, you may detect and compensate for lost packets. If larger volumes of data are sent at a time there is more to resend on failure. In the same vein, if smaller volumes of data are sent then there is an increased likelyhood of failure.

Requirement

There may be a requirement of the client applications to get data quickly or in bulk. For example, video streaming requires a small amount of data as quickly as possible for the video to start playing. Messaging systems such as IRC can't display the message until it has been fully received. As such, video streaming suits smaller packets and messaging may suit larger packets.

Protocol

The protocol you're using dictates the size of data to send. For example, with TCP, if you had a small window size you would have more overhead for acknowledgements. If you had a large window size, you suffer the issue with failure re-sends mentioned above.

phil-lavin
  • 600
  • 1
  • 4
  • 16
3

A car can get across the country faster than a truck. But if you need to get two tons of pumpkins from New York to Los Angeles, a truck is going to get the job done a lot faster than a car. Why? Because the truck, though slower, carries more and thus needs fewer trips.

1

For things like voip phones and instant messaging you want smaller packets. They travel faster but carry less data. You will need more of them but each individual piece gets there faster.

That optimises for latency - how long it takes for an individual word or sound to get to the destination.

Larger packets optimize for throughput - how long it takes the entire set of information to arrive. This is useful for things like file transfers where having a portion of a file does you no good. You can't do anything until you have all of it.

VOIP in particular uses smaller packets. If you waited until you had lots of data to send the transfer would be faster from the time you started sending until the time you finished - but the guy at the other end wouldn't hear anything until you finished your sentence and started sending it.

Grant
  • 18,125
  • 14
  • 75
  • 104
0

It's pretty simple, each packet has some overhead. The time a packet takes to transmit is based on its size and the latency of the network.

So, one small packet will get to the destination fastest. But if you have a lot of data to send the overhead of many small packets will add up to be significant. If you send fewer larger packets then the overhead will remain small and the overall transfer will be faster.

To summarize:

  • For small total data, a small packet is fastest
  • For large total data, large packets are fastest
Chris S
  • 78,455