Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Optimal Packet Size?

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve read up a bit on optimal packet sizes. I am so far under the impression that it varies. Additionally, "Long packets reduce overhead, but shorter packets make efficient forward error correction (FEC) codes". Bigger packets can lead to greater packet loss (due to high error probability). Smaller packets have increased overhead (due to header sizes). Also, I read the Maximum Transfer Unit (MTU) size is 1500 bytes, yet I''ve seen sources suggesting 512 bytes. Any ideas on this descrepency? Any ideas on what packet sizes I should be trying to create? Thanks

Share this post

Link to post
Share on other sites
For maximum size consider the following:
ethernet MTU is typically 1500. subtract your udp header and ip header, that leaves you with 1472 bytes for LAN games.

IP can have a variable MTU across a wide variety of networks/routers. However, packets of 576 bytes or less are guaranteed to traverse the IP network without getting fragmented (which means you will have fewer dropped packets). I believe that leaves you with 548 data bytes, unless you want consider a 60 byte IP max header length, which would leave you with 508 data bytes.

Going larger on either of these numbers could have significant affect on the responsiveness of your game. If your game doesn''t need good response times, then disregard these numbers...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!