Forum Multiplayer Too much bandwidth

Discussion and help relating to the PlayerIO Multiplayer API.

Too much bandwidth

Postby Deril » June 27th, 2017, 2:09 pm

Hello,

I have problem of my game eating too much bandwidth... it was never optimized.. and its stands on 30GB per day... with only 70 concurent players..

My questions:

- can I get/print message bit size with code? I faild to find this property on Message.
- can I get/print total up/down bandwidth somehow in debug server window? (there is bandwidth per second counters on top, but not total)
Thank you for your time.
Deril
 
Posts: 8
Joined: January 12th, 2017, 1:44 pm

Re: Too much bandwidth

Postby robscherer123 » June 27th, 2017, 5:18 pm

Have you already checked the usage section in the PlayerInsight page? That will help display some info on your usage. However it will not show you which messages are using bandwidth and such like you mentioned.

I did do one thing once that helped me track down my message bandwidth usage. You can write your own fairly simple code to track how many message of a certain type (by string) are being received by the server, then save those results to a BigDB table to get a more clear idea on it.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Too much bandwidth

Postby Deril » June 28th, 2017, 11:41 am

Thanks for reply!

Yes, checked PlayerInsight, it gives nice top down picture, but I need deeper understanding why it use so much bandwidth...

Need a function to measure acurate Message size...
Deril
 
Posts: 8
Joined: January 12th, 2017, 1:44 pm

Re: Too much bandwidth

Postby robscherer123 » June 28th, 2017, 2:26 pm

As for the message bandwidth usage, I definitely know what you mean. I've thought it'd be helpful to know which were using up the most bandwidth as well. Like I said though, I believe you can make your own ways of tracking the usage of messages, as that's what I did once.

Inside the GotMessage() function, you can write to a database object every time a message is received, and record the message.type in that object, and the number of times that message was received. I believe there is a bit of overhead just from sending a message itself, aside from the content you manually send in the message. I might be wrong, but I think sometimes the data in your message in negligible in size compared to that overhead. Again, I don't know how long your messages are so I could be wrong for your case. That being said, the shear amount of messages sent is a big indicator of bandwidth. If you wanted to take it a step further, I'm sure there is a way you could calculate the byte sizes of your messages and record them in the dbobject as well.

Here is some info on the overheard in messages and the byte of different databatypes just incase you weren't aware. https://playerio.com/documentation/tuto ... ronization

If you don't understand what I mean about saving the info to a databaseobject, let me know and I could write some sample code.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Too much bandwidth

Postby Henrik » July 2nd, 2017, 2:34 am

At the end of the day, the only way to reduce the bandwidth used is to do less. Send fewer messages. Pack more data into each message. Don't reload BigDB objects or PayVault all the time. Don't send data the client already has.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to Multiplayer