Author Topic: How to calculate server bandwidth usage  (Read 30372 times)

0 Members and 1 Guest are viewing this topic.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
How to calculate server bandwidth usage
« on: July 25, 2006, 08:47:18 am »
The Super-Basic Bandwidth Calculator

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
« Last Edit: June 26, 2007, 12:11:00 am by chrisgbk »

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5010
Re: How to calculate server bandwidth usage
« Reply #1 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?
Careful with that axe, Eugene.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: How to calculate server bandwidth usage
« Reply #3 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)

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: How to calculate server bandwidth usage
« Reply #4 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.

Offline DeMo

  • Soldier
  • **
  • Posts: 127
  • Stay Metal! \m/
    • Encoder 2002
Re: How to calculate server bandwidth usage
« Reply #5 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

<@Evil-Ville> Expect a picture of Chakra` holding his fleshlight soon!

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: How to calculate server bandwidth usage
« Reply #6 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

Offline DeMo

  • Soldier
  • **
  • Posts: 127
  • Stay Metal! \m/
    • Encoder 2002
Re: How to calculate server bandwidth usage
« Reply #7 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. :)

<@Evil-Ville> Expect a picture of Chakra` holding his fleshlight soon!

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: How to calculate server bandwidth usage
« Reply #8 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 ;)

Offline Spasm

  • Soldier
  • **
  • Posts: 241
  • Elite CTF Owner
    • Elite CTF
Re: How to calculate server bandwidth usage
« Reply #9 on: July 27, 2006, 09:45:03 am »
My head hurts from just reading that... Very interesting script.
Owner/Founder- Elite CTF -  http://elitectf.com
OwnedVision - http://ownedvision.com
--An EliteCTF Production.
Snipe & Slice - Saw & Law - One Shots

Offline Thomas

  • Major
  • *
  • Posts: 76
    • mnus.de
Re: How to calculate server bandwidth usage
« Reply #10 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

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: How to calculate server bandwidth usage
« Reply #11 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

Offline DeMo

  • Soldier
  • **
  • Posts: 127
  • Stay Metal! \m/
    • Encoder 2002
Re: How to calculate server bandwidth usage
« Reply #12 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! :)

<@Evil-Ville> Expect a picture of Chakra` holding his fleshlight soon!

Offline Quantifier

  • Major
  • *
  • Posts: 70
Re: How to calculate server bandwidth usage
« Reply #13 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.

Offline skc.r0adkill

  • Major(1)
  • Posts: 17
  • selfkill.com Head-Admin
    • selfkill.com
Re: How to calculate server bandwidth usage
« Reply #14 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.
« Last Edit: August 05, 2006, 12:36:12 pm by skc.r0adkill »
*have phun* =D

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: How to calculate server bandwidth usage
« Reply #15 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

Offline Quantifier

  • Major
  • *
  • Posts: 70
Re: How to calculate server bandwidth usage
« Reply #16 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.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6142
    • Ultimate 13 Soldat
Re: How to calculate server bandwidth usage
« Reply #17 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

Offline Mistercharles

  • Veteran
  • *****
  • Posts: 1371
  • +
Re: How to calculate server bandwidth usage
« Reply #18 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?
shoutout to m'boyz eagles_arrows, echo_trail, wraithlike, sadistatheart, chakapoko maker, jrgp, aznblood, chakra, keron cyst, et al, miss you, let's '#gather some day

Offline Clawbug

  • Veteran
  • *****
  • Posts: 1393
  • 1184!
Re: How to calculate server bandwidth usage
« Reply #19 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.
« Last Edit: September 11, 2006, 08:17:10 am by Clawbug »
Fight! Win! Prevail!