Server to Client packet size increase as clients increase
by DIAG · in Torque Game Engine · 08/30/2006 (2:39 am) · 6 replies
Hi,
A question about the size of the packets going from server to client. I have 4 clients, and I've noticed that as the number of clients increase, the packet size gets bigger from the server to client, obviously to deal with the extra information because of the extra clients. Does anyone have any idea how big the packets can get. For example, how much bigger would a packet about 30 clients than a packet if there was only 1 client in the world?
Thanks for your help,
Damien
A question about the size of the packets going from server to client. I have 4 clients, and I've noticed that as the number of clients increase, the packet size gets bigger from the server to client, obviously to deal with the extra information because of the extra clients. Does anyone have any idea how big the packets can get. For example, how much bigger would a packet about 30 clients than a packet if there was only 1 client in the world?
Thanks for your help,
Damien
#2
Cheers!
Damien
08/30/2006 (11:50 am)
Cheers for your answer, Paul. So, imagining a game with one room, where every player can see every player at every time step. Silly example, I know, but given this situation, would anyone be able to give me an idea of how packet size scales upwards? Just a rough approximation would be good! Would it be reasonable to assume that in this situation, the packet size would increase by the same amount each time another client joins?? I had a quick look at the packet sizes coming from the server, and it seemed that data per second increased by roughly 200bits per second for each client that joined.Cheers!
Damien
#3
08/30/2006 (11:58 am)
Are all the other players moving? Are they doing anything else? How near are they to eachother? All those will still be a factor. Yes in that situation it may end up being a fairly static upscale per client with stock optomizations, but why are you trying to figure out an average packet size per client?
#4
It's a part of my research work. I only have 4 clients, but wish to emulate the traffic of 30+. So I'm using a traffic generator to create the traffic for the other 26 clients for example (this data isn't actually being received by a server - only going through a bridge). I wanted to make sure that the traffic size I was generating matches that which would be generated if there was actually 30 clients. It's pretty easy to do for clients sending data to server, as that is pretty constant, but I noticed that the other way around, server to client, the packet size was increasing with the number of clients. So I figured I'd have to increase the emulated packet size, rather than just using the same packet size regardless of the number of clients.
Damien
08/30/2006 (12:08 pm)
Hi Paul,It's a part of my research work. I only have 4 clients, but wish to emulate the traffic of 30+. So I'm using a traffic generator to create the traffic for the other 26 clients for example (this data isn't actually being received by a server - only going through a bridge). I wanted to make sure that the traffic size I was generating matches that which would be generated if there was actually 30 clients. It's pretty easy to do for clients sending data to server, as that is pretty constant, but I noticed that the other way around, server to client, the packet size was increasing with the number of clients. So I figured I'd have to increase the emulated packet size, rather than just using the same packet size regardless of the number of clients.
Damien
#5
08/30/2006 (1:09 pm)
I wouldn't say that's a very practical way of simulating things. Unless your environment involves very static clients all always needing to be fully aware of eachother, it's not going to relate to how things will work in practice. Torque is built to be optomized and _not_ have a linear increase per client. You generally want to avoid having such a scenario. In any case, you can probably get a fairly accurate simulation of the data that will be sent to clients just by using dummies or simple AI controlled versions of the objects your clients will be controlling. It's hard to really say anything for sure without know what you are working on.
#6
You could however simulate an average throughput simply by generating fuzzy packet sizes around your average observed.
In addition, the max packet size is determined by the global script variable $Net::PacketSize. Note that stock, this is bounded to be between 100 and 450, although it's a very simple bounds check in NetConnection::checkMaxRate.
08/30/2006 (3:22 pm)
As Paul has mentioned, there really isn't a way to guestimate--scoping rules, player/object actions, packet loss, net events, simulation over-rides--all contribute to the actual size of packets delivered to each client--and that size won't even be the same for different clients!You could however simulate an average throughput simply by generating fuzzy packet sizes around your average observed.
In addition, the max packet size is determined by the global script variable $Net::PacketSize. Note that stock, this is bounded to be between 100 and 450, although it's a very simple bounds check in NetConnection::checkMaxRate.
Torque Owner Paul /*Wedge*/ DElia
I forget the code where all this stuff is actually determined, mebee someone else can help with that. Though core data optomization is going to be a matter of how you tweak your pack/unpack update functions for objects. With any significant amount of clients being within relevant space to other clients you are going to be sending full packets, it's a question of what data these packets are sending and if it's going to make your game as smooth as possible.