Official Soldat Forums

Server Talk => Server Discussion => Topic started by: FliesLikeABrick on July 25, 2006, 08:47:18 am

Title: How to calculate server bandwidth usage
Post by: FliesLikeABrick on July 25, 2006, 08:47:18 am
The Super-Basic Bandwidth Calculator (http://ryan.u13.net/bandwidth.php)

The equation it uses for KB/s is:
125(N + N^2) /1024
... where N is the number of players.


for per month, it is the KB/s value times 3600 * 24 * 31 /1024^2


source code (http://ryan.u13.net/bandwidth.phps)
Title: Re: How to calculate server bandwidth usage
Post by: jrgp on July 25, 2006, 08:52:34 am
Wow, I never knew that my servers used so much bandwidth.

I really like this script alot.

Can you please post the source code?
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on July 25, 2006, 08:53:59 am
http://u13.net/~ryan/bandwidth.phps
Title: Re: How to calculate server bandwidth usage
Post by: mar77a on July 25, 2006, 08:59:56 am
Wow, I never knew that my servers used so much bandwidth.

could use* (unless your servers are full all the time)
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on July 25, 2006, 09:03:40 am
Wow, I never knew that my servers used so much bandwidth.

could use* (unless your servers are full all the time)

it is always best to assume worst-case when planning on running servers.
Title: Re: How to calculate server bandwidth usage
Post by: DeMo on July 26, 2006, 12:45:27 am
Very good. I'm thinking about setting up a dedicated server and I was gonna ask for this kind of information.

A question for Flies: did you base it on real numbers collected from U13 servers statistics or you just chose a random number (like that 125 that multiplies N + N^2)?

Oh.. and that bandwith usage is assuming that your server will have 10 players, 24 hours a day, during 31 days! :P
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on July 26, 2006, 06:00:18 am
... how does it assume you have 10 players?  the N is for the number of players.

Yes it assumes 24 hours/day and 31 days, because you obviously want to calculate the maximum bandwidth usage.

the equation is based on the nature of how multiplayer games work.  the 125N is every player sending 125B/s to the server.  The N^2 is everyone else's information being sent to everyone else
Title: Re: How to calculate server bandwidth usage
Post by: DeMo on July 26, 2006, 06:54:14 pm
I understood the N Flies.. I wanna know how or why you chose (or assumed) every player sends 125B/s to the server. :)
Title: Re: How to calculate server bandwidth usage
Post by: EnEsCe on July 26, 2006, 07:40:52 pm
The average bytes per second is 125, if you press F3 while playing you will see up in the right corner it says that ;)
Title: Re: How to calculate server bandwidth usage
Post by: Spasm on July 27, 2006, 09:45:03 am
My head hurts from just reading that... Very interesting script.
Title: Re: How to calculate server bandwidth usage
Post by: Thomas on August 01, 2006, 02:38:45 am
if i run around i have more than 150 all the time, and running around is what most of the people do

btw, nice calculation
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on August 01, 2006, 06:12:28 am
I know that it can be up to 150, but taking into account spawntime and the fact that not everyone is running around, the average is probably somewhere between 100 and 125
Title: Re: How to calculate server bandwidth usage
Post by: DeMo on August 03, 2006, 02:02:52 pm
The average bytes per second is 125, if you press F3 while playing you will see up in the right corner it says that ;)
That explains the 125, thanks! :)
Title: Re: How to calculate server bandwidth usage
Post by: Quantifier on August 04, 2006, 09:22:13 am
There's one big flaw in this script: it counts only udp data. Soldat's tiny packets make network overhead reach several hundred percent.
Title: Re: How to calculate server bandwidth usage
Post by: skc.r0adkill on August 05, 2006, 12:32:20 pm
Many servers have map-downloading activated -> more traffic ;)
But its a very good calculation when I'm watching our bandwidth usage.
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on August 05, 2006, 01:37:20 pm
the overhead and map-downloading aren't all that much compared to the udp traffic, especially since this formula uses the assumption that the server is always full
Title: Re: How to calculate server bandwidth usage
Post by: Quantifier on August 06, 2006, 07:35:22 am
I disagree. I did a 15 minutes test with Ethereal and mostly full Leo's server (12-16 players).
Here are the statistics:

server->client:
packets: 32667
total bytes: 3090956 (this is skewed upwards, because every frame I receive with less than 18 bytes of udp data is padded to total 60 bytes)
udp data bytes: 1718942 (same here)

client->server:
packets: 9497
total bytes: 518474
udp data bytes: 119600

For me, this is HUGE overhead.
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on August 06, 2006, 01:13:24 pm
If you think you can create a better one, be my guest.  I feel that mine is more than accurate enough for most needs, but I'm obviously not going to argue with you if you can create a more accurate one
Title: Re: How to calculate server bandwidth usage
Post by: Mistercharles on August 06, 2006, 03:05:45 pm
Yes! I can run a 10-slot on my server computer!

One question FLAB: Could you make a RAM usage calculator, or at least give me a general rule of thumb?
Title: Re: How to calculate server bandwidth usage
Post by: Clawbug on September 11, 2006, 07:50:41 am
Yes! I can run a 10-slot on my server computer!

One question FLAB: Could you make a RAM usage calculator, or at least give me a general rule of thumb?
What I just took a look at my 2 servers, another one is empty CTF, another one is 8 players, Full DM atm.

They are taking 3MB the CTF, and about 20MB the DM.

Maps arent taking RAM. They are like 20-60KB's of size. Probably logs + players do take it up.
Title: Re: How to calculate server bandwidth usage
Post by: FliesLikeABrick on November 02, 2006, 01:42:50 am
A Soldat server takes, on average, 25-30MB of RAM.  2.5.2 with scripting enabled takes more, I believe 50-60MB (EnEsCe can confirm this or correct me). 
Title: Re: How to calculate server bandwidth usage
Post by: GAMEOVER on May 09, 2007, 11:19:35 pm
How does the answer one would come up with using your formula Flies help them? How does it effect game play? (asking because I dont know)
Title: Re: How to calculate server bandwidth usage
Post by: Mikeman on May 28, 2007, 04:06:41 am
How much does the new Dedicated server use RAM?
2.6.0 and 2.6.1
Title: Re: How to calculate server bandwidth usage
Post by: EnEsCe on May 28, 2007, 04:13:09 am
Average around 7MB
Title: Re: How to calculate server bandwidth usage
Post by: -Major- on June 01, 2007, 01:20:05 pm
Well this is what I get:

Server: 3400~ Kb RAM
Map: 40-80~ Kb RAM
Player: 200-600~ Kb RAM

I don't know how much a script takes.

but I would say 1 server with 10 players would take probably 7400 Kb~ or 7.23~ Mb RAM

even though with scripts I have no idea. but how much processor does it take for, Server, scripts, players, map?
Title: Re: How to calculate server bandwidth usage
Post by: MetsuriTossavainen on June 27, 2007, 10:49:02 am
That's nice script.
Title: Re: How to calculate server bandwidth usage
Post by: ericbarch on August 06, 2007, 06:13:00 pm
Hmm, I have a 512kbit/s upstream cable modem, yet it seems that things start lagging around 6 slots connected. According to your calculations, I should be able to handle much more than 6 slots. What gives?
Title: Re: How to calculate server bandwidth usage
Post by: Etheryte on September 20, 2008, 05:10:36 pm
Hmm, I have a 512kbit/s upstream cable modem, yet it seems that things start lagging around 6 slots connected. According to your calculations, I should be able to handle much more than 6 slots. What gives?
No calculation can give you perfect results, FLAB also declared that. There are more variables to count in if hosting a server (please, do read the whole topic, it's not long).
Title: Re: How to calculate server bandwidth usage
Post by: Mercury92 on December 01, 2010, 03:37:43 pm
Link in first post doesn't work anymore D:
Title: Re: How to calculate server bandwidth usage
Post by: jrgp on December 01, 2010, 03:41:17 pm
Link in first post doesn't work anymore D:

It should within a few days when the server issue gets resolved.

hmm, it appears to be mirrored here:
http://devs.soldat.pl/wiki/index.php?title=Bandwidth
http://devs.soldat.pl/wiki/bandwidth.php