Server Side Lag Reduction Techniqes

Anything about how you get those awesome core-dumps, or why you don't get them...
Post Reply
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6714
Joined: Thu Dec 18, 2003 7:03 pm

Server Side Lag Reduction Techniqes

Post by Tank Program »

First, some one please tell me if I spelled "Techniqes" correctly. That being out of the way, here are some of the things I have seen that reduce lag. First thing, fewer players, but that is obvious. Next thing is smaller grid, which may be tied to the next thing, which is higher process priority. Also, more bandwith is good, as well as being closer to the backbone. But, there are two settings which, if possible must be increased. Take your upload bandwith, subtract 100, then devide by MAX_CLIENTS. Round this downwards to the nearest multiple of four. If this number is less then 8, you should reduce MAX_CLIENTS. That being said, the number you do get should be the value set for MAX_IN_RATE and MAX_OUT_RATE. Now, what does GRID_SIZE have to do with it? Same thing as CYCLE_SPEED and MAX_CLIENTS. It boils down to CPU... I know that may sound stupid but I think that's what is really behind lag. When you go faster, the CPU has to do more, when the grid is bigger, the CPU has to do more, when there are more people the CPU has to do more. Or at least that's my theroy. For example. These forums, and the armagetron forums server are running on the same computer. Besides that and some routing functions that's all it does. Sits there running armagetron dedicated, that's a 2.53GHZ Pentium4 with 512mb of DDR333 with nothing todo but this. As I said somplace else the conenction itself is only 2mbit/384kbit ADSL. And I have had a lot of people commenting on how little lag there is on the server... Which leads me to believe that, as my connection is kindof crappy it must be the server itself which is good.

So, if your server is experiencing a lot of lag, you can increase the process priority of the armagetron, which will give it more cpu cycles, higher fps, smoother gameplay. In linux you can do this with the "nice" command and in windows you can do it from the task manager and right-clicking on the process, and selecting a higher priority that way. (That is from the list of all running tasks.) You can also limit the number of people playing with MAX_CLIENTS to decress CPU load from armagetron. Or you can increase MAX_IN_RATE and MAX_OUT_RATE to take advantage of available bandwith. Also, you can decrease CYCLE_SPEED and GRID_SIZE to make it use less CPU.

So there it is, that is my theroy of why my armagetron server is good and others suck, nah, not really, just kidding :mrgreen:. This is what I believe are the factors that have to really do with lag. It's all in the CPU. Hope this helps some admins out there!
Image
User avatar
locutus
Match Winner
Posts: 662
Joined: Mon Jan 19, 2004 10:28 pm
Location: MST [Quotation: "No Good Deed Ever Goes Unpunished.."]
Contact:

Post by locutus »

techniques
Image
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

great work Tank :!:

everybody playing armagetron should read that, many players have been wondering about server lag and you've probably hit the nail on the head

btw your server was fun to play on, it's amazing how many different "games" armagetron is, how different the gameplay can be that is...

once again thank you and keep up the good stuff :mrgreen:

1 last thing: normal players like me not running a server should look at their rates as well and crank it up according to what it says in the menu comment (the comments that appear when a menu choice is selected). you find it all at Game | Network Game | Network Setup | Input Rate: ## (and maybe Output Rate although it says it never uses more than 2 or 3)
User avatar
locutus
Match Winner
Posts: 662
Joined: Mon Jan 19, 2004 10:28 pm
Location: MST [Quotation: "No Good Deed Ever Goes Unpunished.."]
Contact:

Post by locutus »

I am going to re-read it in hopes of setting up my pc to optimum performance for hosting a tourney match...
Image
L7
Posts: 2
Joined: Sat Apr 24, 2004 6:55 pm
Location: phoenix az
Contact:

server lag

Post by L7 »

most of the reason you get lag is because you have your graphics set too high on the client side and when the players increase so does the load on your graphics processor...i am running a server right now and i watch it when there are players online and the processor usage never goes above 10 percent no matter what and as for bandwidth lag that should only come when clients are logging on to the server because the server gives the client logging on a lot of bandwidth for a second...thats my 2 cents :twisted:
the greatest loss that of losing one's self can often pass as if it were nothing...every other loss 5 dollars a wife an arm etc is bound to be noticed...soren kierkegaard
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

which server is yours L7? *just curious* :D
Post Reply