|
Author Topic:   Net Settings for Dedicated Server
NOPeR
Member
posted June 01, 2000 02:44 AM            
This is a post that I hope both LDA and others will respond to concerning the best settings for a Dedicated TM Server.

I had tried playing TM online with a 56k modem that connected at an average of 45k. I found my ping to vary between 200-500 and sometimes during really laggy moments I went into the quadruple digits!

Now I have a very speedy DLS connection and have an average connection of 600k and have an average TM ping of 150-300 YET the games still have a very noticable lag like problem where weapon fire doesn't show up and tanks jerk around the screen, sometimes very unpredictably.

Now, I host several a LAN party at my house on the weekends and we love to play Tread Marks. So some of the people on the LAN makes a single player game and we all join this game - No Lag, no problems...I mean, sure it's a LAN game so its great right?

But I have read post of people joining others single player games and no one has yet to mention any of these games running badly.

So what is the optimal Net Settings for a dedicated server?
- The original dedicated.cfg has this:
#Updates per second rate of the server. This should
#NOT be more than 10 for Internet Servers, unless
#you only want High Bandwiidth people playing. LAN
#servers can safely set the update rate up to 20.
#Note that this doesn't affect the FPS of the clients,
#only the rate that network update packets are sent.
DedicatedFPS = 10

#Max bytes per second sent to each client.
ServerRate = 4000

I started a server, NOPeR's Brawl, with these settings:
DedicatedFPS = 20
ServerRate = 10000 (10k/sec ??)

I was trying to mimic the settings of a single player game. I then connected to my server and noticed a wonderful improvement over the recommended settings.

Several others joined the server and when I asked if they were experiencing any problems they both said no, and that the connection/game seemed fine.

One person was running with a fast connection as his/her ping was around 200 and the other was using a 56k modem and had a ping between 300-400. At one point there was 5 human players and 2 bots in the game and everyone seemed to be enjoying the game.

SO:

1. Could LDA please help me out here and give a detailed description on what settings there are for setting up net game?

2. What are the settings of a Single Player game (It appears you can set the ServerRate setting for single player in the options)?

3. Has anyone else played with the values? What kind of success have you had?

4. Anybody who is willing to help me test the connection using different settings please let me know and we can setup a time to do some tweaking

Sorry for the long post, but I play a lot of online games and I know that Internet games can be as smooth as LAN games...I'd like to help get the TM server as smooth as some others I've seen.

NOPeR
jonhansen@usa.net

IP:

swisher
Member
posted June 01, 2000 10:59 AM            
I know that when I initially ran Tread Marks online, I had the netrate set to the default of 2k/second and online was terrible. When I set it to 5k/second, online improved greatly. I now hve DSL, so I have it set for 10k/second and have little lag.

By the way, netrate is set by going into game options from main Tread Marks menu.

It's interesting that you were able to set your server to 20 FPS and 10k/second without harming low bandwidth players. I'd leave it like that and see if people complain (especially since you said it seemed to work).

LDA: On your next demo version, please change the default to 5k/second for online play. As I said, the game was virtually unplayable at the default 2k setting.

[This message has been edited by swisher (edited June 01, 2000).]

IP:

NOPeR
Member
posted June 01, 2000 12:48 PM            
I also played with the Netrate and decided that 10k/sec is the best setting for my connection as also experience acceptable lag.

The lag that I get thru my DLS connection and most TM servers is not bad, but it still causes my tank to stutter a bit when moving at very fast speeds and weapons to fire noticeably late.

The game is very playable. I am being picky. Sometimes you have to line up the perfect shot with a Mass Driver from half way across the map or fire a 120 round while flying thru the air. Both of these moves complicated if the enemy tank moves unpredictably because of lag or your gun fires moments after you press the button.

Most online games thru a fast Internet connection are as smooth as LAN play. I believe that TM should/could be the same.

Now let me try to examine the two settings available in the dedicated.cfg file. Note this info may be way off so please comment if you see any errors:

1. DedicatedFPS, I read this to mean how many times/second the server will send packets to clients containing current game info as read by the server. It would help to know how big each packet is. Perhaps it is variable depending on the number of players/entities in the game?

(Also, does this value tell the client how many packets to send to the server each second? If so I see how this could cause problems for slower connections. Solution, allow the client to control how many packets to send, or even better use a gauging method to negotiate a suitable packet number for clients.)

I see this setting as the lag creating culprit as it only allows my computer to see what the server sees 1/3rd to 1/5th as often as the updates I see on my screen. (DedicatedFPS = 10, FPS = 30-50 average)

Now if I increase this value the differences between the projected placement of tanks and weapons between the client and the server decrease AS LONG AS the client can receive that many packets per second.

So what happens if the client computer cannot handle the number of packets? Well, it's not a computer issue, it a bandwidth issue so the packets timeout. This is not an issue IF the slower clients still receive the latest packets with the newest information. Sure they will still experience some jumping effects, but isn't that already the case?

2. ServerRate, Okay - why do we set our Netrate to 10k/sec in options if the ServerRate limits each user to a specific number of bytes per second? The default is 4000 or 4k/sec, if I set my Netrate to 10k and connect to a server with the default rate I will only receive up to 4k!

I can see how this would help keep a server from getting to bogged down when many players join - but even if 12 players join and each requests 10k and the server gives them 10k/sec this is only 12*10k = 120k/sec. Now lets assume that the clients return half as much information: 120k + 60k = 180k. This is within the reasonable to slightly high range for my own connection, but I still think the results would be acceptable since only high-speed connections would actually request 10k/sec.

So unless your trying to throttle your server bandwidth why would you choose to server any less data than the clients can request?

QUESTION: Anyone know how these two settings go together? Example: What occurs if the ServerRate is set to 4k and the DedicatedFSP is set to something insanely high, like 80...would the 80 updates per second really matter or would all packets after the 4k be dropped by the server?

I know that a lot of the questions cannot be answered but if anyone would like to comment feel free...

ALSO - I am leaving the "NOPeR's Brawl" server up for a while with the settings:
DedicatedFPS = 20
ServerRate = 10000
If anyone would like to try it out and let me know how you felt the game played and if it lagged your system up (or chocked!) you can post here or email me at jonhansen@usa.net, it would help a lot to get peoples responses!

NOPeR
jonhansen@usa.net

IP:

swisher
Member
posted June 01, 2000 01:25 PM            
You sound fairly knowedgable on networking. I'm sure there's a tool that you could use to do the equivalent of a trace-route. This tool would let you record the packets sent and, hopefully, raw byte counts, to/from your PC to a specific IP address. This could help in letting you solve some of your questions. Do it for your server only (i.e., with you not playing, but one other person playing your server from a different connection); this would let you tweak and benchmark the dedicated.cfg settings. You could test YOUR play throughput (the netrate in game options menu) by bringing your server down (so as not to hamper throughput) and then connecting to any server other than your own. I don't know of any such tools off-hand, but they must exist. I think Wild Tangent is fairly knowledgable.

I'll play your server tonight. I'm connected with a DSL 256 down, variable up. I'll post tomorrow to let you know how it went.

I just took a JAVA couse (I know Tread Marks is written in C) and learned of threads and some basic networking. I guess it's safe to assume that Tread Marks uses UDP datagrams (i.e., packets). Boy, I'll bet if Tread Marks were to use Stream sockets combined with threads, there would be no problelms -- it'd be a real bear to code, though.

[This message has been edited by swisher (edited June 01, 2000).]

IP:

NOPeR
Member
posted June 01, 2000 03:03 PM            
Yes, I have a pretty good idea what I'm talking about. I'm an MCSE (Microsoft Certified Systems Engineer ... for anybody who doesn't know what MCSE means) and do some socket programming in C++.

I have a couple packet-tracking software packages, but I was trying to stay away from doing this...it's easy, but it seems that everytime I go to do a small project I blow it way outta porprtion AND I don't want to get poking around in LDA's packet format either! All I really want to know is how to run a server with no lag

Guess I will probobly do some simple testing thou...thanks!

NOPeR

IP:

Kaeto
Member
posted June 01, 2000 03:17 PM            
Don't set the FPS above 10, unless you only want DSL+ speed players playing. Set the byterate max to 10k, though, and high bandwidth people can have low lag, AND us lowly modem peeps can still at least try

IP:

NOPeR
Member
posted June 01, 2000 04:50 PM            
Kaeto - Have your tried playing on a server with DedicatedFPS set to 20 or more?

Several people with 56k modems and even an 33.6'er have played with me on my server and they didn't complain of extra low ping or extra bad lag, there comments were always "Same as other servers."

`Course I still have much testing to do so I can't even be sure it is helping out the DSL players!

I really need you guys to connect to "NOPeR's Brawl" and tell me what you think connection wise...

And until I get enough feedback, good or bad, it will stay with these settings:
DedicatedFPS = 20
ServerRate = 10000

ALSO - Any feedback, at all, from LDA would be nice.

NOPeR
jonhansen@usa.net

IP:

Kaeto
Member
posted June 01, 2000 06:55 PM            
I've played servers at 20 and 15 and they all were horribly laggy. Of course, I have a 24000 bps connection but on those servers my tank literally drives itself. I cannot even drive around, never mind play, even with only one opponent.

IP:

JL
Member
posted June 01, 2000 09:37 PM            
I run dvsduke's server and played around with the numbers alot. I came to a conclusion
that its better to set the server rate low.
Its ok high until someone joins with a slow connection, then it slows everyone down. but if its set at 4 to 5000 it does not seem to affect the other players as much. I always keep the FPS at 10 I never found that changing made much of difference for modem users sometimes making it worse if set to high. This only a theory based on one server but i hope it helps. Any input on this subject would be grateful.
(BTW I have a dsl line 1500kb down 384kb plus up.)

[This message has been edited by JL (edited June 01, 2000).]

IP:

swisher
Member
posted June 02, 2000 08:43 AM            
Didn't see your server up last night. Probably a good thing, as between 7:00 p.m. and 10:30 p.m. CST, all of the servers were lagging. Wierd -- my PING was 150-250, but every server was jerky.

Well, I'll look for NoPeR's Brawl Sunday night.

IP:

Kaeto
Member
posted June 02, 2000 09:20 AM            
If people are lagging with your byte rate set high, either
1) You don't have enough outgoing bandwidth for them all
2) They have their settings wrong

IP:

NOPeR
Member
posted June 02, 2000 12:15 PM            
Sorry to anyone that tried to find my server but couldn't...I took it down after some extreamly laggy moments :P

Here is what happened Thurday evening:
I have the server up w/ 2 bots and Cell joined the game on a 56k connection and said the game was running as smooth as if not smoother than most servers, but hey, there was only 2 people in the game. Later Cell left.

About 10 minutes later AMG???? (Uh, I forget, but some funky name) joined and everything was looking good. Then people started to file in but the level was about to change...Once the new lever started we had 4 people in the game. I think the list was myself, Dudey, AMG????, and JL AND OMG the ping went sky high! Like up in the 5 digits! Dudey leaves. Things get good, Dudey joins again, ping gets bad.

So everyone is thinking it's Dudey, but then AMG???? leaves and ping gets good...Okay, so it's the number of people. Seconds later someone else joined and it got so bad that I told everyone that I was gunna try to lower the DedicatedFPS to 10.

Server down, Set to 10, server up. Dudey joins as does JL and Cell and of course myself. Same number of people and things were running fine...but the server was noticably laggy.

Now, Dudey is in the middle of kicking some serious but (mine) and someone else joins (I start forgetting names at this point) then another and BAM! ping back up to insanity.

SO:
When DedicatedFPS = 20 and ServerRate = 10000 The server could handle 3 clients.
When DidicatedFPS = 10 and ServerRate = 10000 The server could handle 5 clients.

So what is the problem? Well, I still don't understand how the DedicatedFPS works with the ServerRate, BUT if I have 6 clients and I am trying to send them 10k a piece each second that is 60k...Hmm a little heavy for my 384kps outgoing. (60 * 8bits = 480kps)

Your right Keato!! Not enough outgoing bandwidth! And I will take JL's advice and lower the ServerRate...

Conclusion for Thursday:
- Setting DedicatedFPS to 20 didn't seem to affect any of the 56k'ers, at least not to a point where they were having problems.
- DedicatedFPS set to 20 seemed to double my outgoing bandwidth since it cut the number of players that my server could handle in half!
PERHAPS: Clients(ServerRate*(DedicatedFPS/10)) = Outgoing bandwidth
- ServerRate = 10000 is TOO HIGH for my connection. (I should've noticed this before!)

I will change the settings to:
DedicatedFPS = 20
ServerRate = 4000
And run the server again, hopefully over the weekend (6/2/00 thru 6/4/00)

(4000(20/10)) / (384k/8) = 6 max clients
(hopefully without lag!)

Versus the default settings of:
(4000(10/10)) / (384k/8) = 12 max clients
(Slightly laggy)

Anyone who wants to check it out and give me some feedback - feel free...

NOPeR
jonhansen@usa.net

IP:

Kaeto
Member
posted June 02, 2000 03:42 PM            
Noper, actually, server rate is the max that a client is allowed to suck up. Now when I connect to your server, I'm only sucking 2 or 3k/sec. 56k people can usually pull around 4-5k/sec. DSL/cable/Tx/whatever can pull several HUNDRED k/sec So something's kinda fishy. Why don't you try a FPS of like 15 or 12 or 17? Hehe...

Oh, and if anyone doubts the source of my info, most of it is from the mouth of the coder himself, so I think I'm right.

DedicatedFPS is how many times/sec the server TRIES to update each client. When the server can't do that, big problems happen, with some clients getting updates, and others not getting them hardly ever. So you get (TADA) lag.

[This message has been edited by Kaeto (edited June 02, 2000).]

One more thing. Every single single player game I've joined, regardless of host speed has lagged like a mother...

[This message has been edited by Kaeto (edited June 02, 2000).]

IP:

JL
Member
posted June 02, 2000 06:50 PM            
I keep close tabs on my outgoing data rate 3k seems to be the average for a single client with dialup service, but the most outgoing data I ever had with TM was 30KB with five clients on.
The average was about 18 to 20.But would go as low as 10. Quite a fluctuation. And yes people with high bandwidth do exceed the 5000kb limit I set but not by that much, just a couple of KB.
My thought on fps are if you double the frame rate you must be doubling the amount of data needed. So at 10 fps a client is using 3KBs, but at 20 fps wouldnt they need 6KBs.
And does anyone know where or how to test how much outgoing bandwidth you have.
I upload to I-Drive at about 50KB but don't know if they have limit or how much bandwidth is being used by others I'm looking for somewhere to upload where I know there aren't any unknown variables to skew the results.

[This message has been edited by JL (edited June 02, 2000).]

[This message has been edited by JL (edited June 02, 2000).]

IP:

NOPeR
Member
posted June 02, 2000 06:52 PM            
After having much lag Thursday I changed the settings to:

DedicatedFPS = 10
ServerRate = 10000

This is exactly what you are recommending, yet with those settings my server was only able to handle 5 clients.
384kbps/8 = 48k = 4.8 players set at 10k

Again, too little outgoing bandwidth. Hmm, I guess the amount of data sent by/required by TM for internet play is pretty high...or at least compared to some other games that I am able to host without lag.

NOPeR

IP:

JL
Member
posted June 02, 2000 07:10 PM            
Since most 56k modem users can olny use 4-5KBps You could set the serverrate to 5000 FPS to 10 and be able to handle 10 clients. Highbandwidth player have a slight advantage with the severRate set to 10000 but set at 5000 it evens the playing field a little. Of course the AI's have the best advantage, But there still not much of a problem.
BTW the fewer AI's the less data needs to be sent out. Going from 4 to 2 made a noticable difference on my server. I can't remeber how many was on NOPeR's.


[This message has been edited by JL (edited June 02, 2000).]

IP:

Kaeto
Member
posted June 02, 2000 09:39 PM            
Here's a simple explanation of the settings
ServerRate is the per-client limit on how much data goes out. The game tries to not send out more than serverrate amount of data to each client per second

DedicatedFPS is how many times per second the server tries to send updates. The more updates the client receives, obviously, the smoother. But bandwidth, arg, it keeps us from sending as many as we want. So if we set DedicatedFPS to high, the client only gets a few updates per second because the packets get dropped by the rate-restricting code.

IP: