🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Average user packets per second

Started by
5 comments, last by Gl2eenDl2agon 9 years, 5 months ago

I'm looking into making a hybrid client/server and peer to peer game and I need to find out how many packets per second the average user can process. I did some tests and found mine is about 70 up and down with the data size I need to transmit per second.

I haven't been able to find much about this on google.

Any ideas of what the average user's packets per second would be with a data size of 240 transfered through UDP?

Advertisement

If you're trying to ensure that you don't flood clients with data, then it would be sensible to perform some dynamic throttling. Start with an estimate of what you might consider appropriate. When you start dropping packets, halve the estimated bandwidth, otherwise increase slowly by some constant value.

(Thanks to hplus0603 for this recommendation in a previous discussion)

I would also recommend only modifying this value (reduction or growth) after it can be confirmed that data has been received from the client since the last change was made (as there might be n packets dropped before the client receives data at a reduced rate from the server due to the packet loss, so you would actually reduce the bandwidth by 2^n if you did not take this into account).

Thanks, I'll keep that in mind. Seems like a good idea.

need to find out how many packets per second the average user can process


The number of packets per second is a reasonably meaningless value for most situations (perhaps except for certain mobile situations.)
The reason is that any client computer and client link is likely to be able to process many thousands of empty packets per second.
The real questions are:
- what's in those packets?
- how much is in those packets?
- what are the characteristics of the link between the sender and the receiver?
You have control of #1 and #2, but unfortunately not #3, which means that you have to assume some minimum, and when a client can't fulfill the minimum, detect it and disconnect (giving a clear error message about what the problem is.)
enum Bool { True, False, FileNotFound };

Thanks. I did some testing. I sent out arbitrary amount of UDP packets per second with the required data size to my public IP, and found that packets start being dropped between 30-40 a second.

Not sure if that's a good testing method.

Turns out I can send and receive more than 30-40 packets a second. With my test I was sending all packets in an instant after a second had passed. I just have to come up with a solution to control when players in an interest group start sending their updates to each other within a period of a second.

Turns out I can send and receive more than 30-40 packets a second. With my test I was sending all packets in an instant after a second had passed. I just have to come up with a solution to control when players in an interest group start sending their updates to each other within a period of a second.

Typically the packets wouldn't be sent all at once every second in a real world scenario. Send out your packets every 10 milliseconds or so.

Also remember that the internet is slower than your testing network, and routers typically start dropping IP packets when the buffer for an interface is too full (ie, too many packets too fast for the speed of the line).

Of course if you are really nerdy you could set up two cisco 2500 routers with a serial wan link and manually set the speed to whatever you like on that link and test it to real world 2001-ish internet scenarios.

This topic is closed to new replies.

Advertisement