SRCDS Steam group


Rate problem?
#1
Im havin a crazy ping problem. When theres like 14 people in my server all the pings jump up to around 175. Can someone tell me if its my rates.

// bandwidth rates/settings
sv_minrate 4000
sv_maxrate 20000
decalfrequency 50
sv_maxupdaterate 100
sv_minupdaterate 20

Your help will be greatly appreciated. THANX ahead of time guys. Oh yeah my connect is 1536 down and 1024 up.
Reply
#2
maybe setting your maxrate a lil lower might do it.
Reply
#3
Thanx for the reply. So other then that my rates are ok. Also what
would u recommend as a maxrate, say cut it in half?
Reply
#4
In the server.cfg ...

Code:
//Rates
sv_minrate X
sv_maxrate X
sv_minupdaterate X
sv_maxupdaterate X

alias "dslow" "sv_minrate 2500;sv_maxrate 2500;sv_minupdaterate 66;sv_maxupdaterate 66;echo !!! SERVER RATES SET TO DEAD SLOW !!!"
alias "vslow" "sv_minrate 3500;sv_maxrate 3500;sv_minupdaterate 66;sv_maxupdaterate 66;echo !!! SERVER RATES SET TO VERY SLOW !!!"
alias "slow" "sv_minrate 3500;sv_maxrate 5000;sv_minupdaterate 66;sv_maxupdaterate 66;echo !!! SERVER RATES SET TO SLOW !!!"
alias "fast" "sv_minrate 3500;sv_maxrate 9999;sv_minupdaterate 66;sv_maxupdaterate 66;echo !!! SERVER RATES SET TO FAST !!!"
alias "vfast" "sv_minrate 3500;sv_maxrate 20000;sv_minupdaterate 66;sv_maxupdaterate 66;echo !!! SERVER RATES SET TO LAN FAST !!!"
alias "default" "sv_minrate X;sv_maxrate X;sv_minupdaterate X;sv_maxupdaterate X;echo !!! SERVER RATES SET TO DEFAULT !!!"

// Rate Displays

alias "rates" "echo  ;echo =====SERVER RATE ALIASES=====;echo dslow;echo vslow;echo slow;echo fast;echo vfast;echo  ;echo default;echo  ;echo server_rates;echo ==============================;echo  "
alias "server_rates" "sv_minrate;sv_maxrate;sv_minupdaterate;sv_maxupdaterate"

echo "*** Adding Server RATE Aliases ***"

SRCDS Wrote:=====SERVER RATE ALIASES=====
dslow
vslow
slow
fast
vfast

default

server_rates
==============================


Here is how I do rates...

First I have a few settings based on the conditions of the game and server location (LAN, bad connection day etc...). I have set them as aliases to the console. You see I have a few and they are easily forgotten, so this is where the rate display is moved into play.

the command "rates" will display into console all the commands for rates. the command "server_rates" displays the current cvars for rates. This is a handy tool I crafted up and I suggest you use it too. Just set your rates at the top, then transfer them into the default cvars so you can revert back ingame whenver you need to.


**PS**

the min and maxupdate rate should reflect your tickrate! 66 = 66
Reply
#5
hey thanx alot zealot, i had no idea u could create aliases like that with SRCDS. very informative.
Reply
#6
wha.. i didn't know that either =| lol. i may have to do something like that. hehe guess i have learned my something for the day =)
Reply
#7
hexitnow Wrote:Im havin a crazy ping problem. When theres like 14 people in my server all the pings jump up to around 175. Can someone tell me if its my rates.

// bandwidth rates/settings
sv_minrate 4000
sv_maxrate 20000
decalfrequency 50
sv_maxupdaterate 100
sv_minupdaterate 20

Your help will be greatly appreciated. THANX ahead of time guys. Oh yeah my connect is 1536 down and 1024 up.

minrate/maxrate is the minimum/maximum speed of transmission
in bytes per second per client connected to your server.
Lets calculate the worst case scenario.
so if you have
14 clients getting 20000 bytes/s each
its 14players x 20000bytes/second/player = 280000 bytes/second = 280000 x 8 = 2240000 bits/s
= 2240000/1024 = 2188 kbits/s
this is more than twice your upload can handle.

now lets calculate the right value for your server.
the smallest of your bandwidths is the upload bandwith
so we use this for all calculations as it is the limiting factor.
available bandwitdh = 1024 kbit/s = 128 kByte/s = 131072 byte/s
this bandwith is divided by 14 players:
131072 byte/s / 14 players = 9362 bytes/s for each player.

minrate ideally should be set as low as possible because
if players want to use less of their assigned rate its better for your server that bandwitdh becomes available for other things.
Also its more fair to 56k modem players they get really high ping / choke lag if you set the minrate too high because your server starts sending faster than they can receive data so data gets lost(choke).
So it would be best to set minrate to 0 and let the player choose minrate.
however to protect other players from so called rate hackers i recommend a minrate setting of 2048-3172 (2-3 kByte/s)

Regarding updaterates i see these settings are far too high.
updaterates are the number of times a server sends the positions of other players events etc to each player.
every update requires around 200-600 bytes. it depends on the number of changes in the server model and the size of the updates can vary greatly.(i cannot give you a formula for this, sorry)

but even of we take 200 bytes
200 bytes * 100 updates/s = 20000 bytes / second it would work good for
maxrate 20000 but we dont have this much bandwith!
so we should base it on what we have and its 9362 bytes/s
9362 bytes/s / 200 bytes/update = 46(best case scenario)
9362 bytes/s / 600 bytes/update = 15(worst case scenario)

set it to 15(its very well playable due to the lag compensation)
put on the map that lags the most and fill it with people then add 1
untill lag occurs. then subtract 2 or so and this is close to the optimal value for your setup.(i guess it will be 20 or so)

sv_minupdatrate should be set to around 4
(to stop rate hackers but save bandwith if possible and help slow connection people for the same reasons as minrate discussed above)


so you should set

sv_maxrate 9362
sv_minrate 2048
sv_maxupdaterate 15
sv_minupdatrate 4

also you should try to use sv_downloadurl
you can put maps on fast webspace and people who dont have them will get it from webspace automatically. (it even looks like they get it from your server) its very fast you dont see the seconds counter (of course if the web host is fast) it saves a slot and more importantly
reduces the lag because a gamer will not use his full rate all the time but a map downloader will hold at its maximum rate for minutes.
if your server rates are not good a downloader can be just the raindrop that spills the bucket.

also you should check your real bandwith if 1024 is what your provider says its almost certainly not the case usually what you get is about 90-80% of the theoretical value to to line noise or overhead.
you can measure this and if necessary recalculate the values above.

i wish you good luck

Roci







Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)