Optimal Packet Size?
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
The answer to that question depends entirely on your game.
e.g. you just need to experiment and figure it out yourself.
Ben
[ IcarusIndie.com | recycledrussianbrides.com ]
KalvinB - (to Jessika) do you accept Jesus as your lord and savior
Jessika - Sure I can accept all forms of payment.
e.g. you just need to experiment and figure it out yourself.
Ben
[ IcarusIndie.com | recycledrussianbrides.com ]
KalvinB - (to Jessika) do you accept Jesus as your lord and savior
Jessika - Sure I can accept all forms of payment.
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...
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...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement