[bf1942] Linux Server Lags

jjohnso1 at sbcglobal.net jjohnso1 at sbcglobal.net
Sat Dec 28 22:18:23 EST 2002


To follow-up from before... with the settings I described at the end of my
previous message, I could no longer connect from my internal LAN, but
someone could connect from the internet.  So what I finally gave into was:

----------------------------------------------------------------------
ServerSettings.con
----------------------------------------------------------------------
game.serverInternet 1
game.setServerIP <public-IP>

----------------------------------------------------------------------
Firewall
----------------------------------------------------------------------
udp allow 23000

This seems to allow internal and external clients to connect, and it also
seems to run MUCH smoother when connecting from an internal client now.  My
original problem -- lagging with 2 players -- seems to be noticeably
improved as well.

The negative side-affect of this configuration -- now my server is published
to Gamespy (so anybody could join).  Of course, this can be prevented by
setting a password if it becomes an issue.

John

----- Original Message -----
From: <jjohnso1 at sbcglobal.net>
To: <bf1942 at icculus.org>
Sent: Saturday, December 28, 2002 6:33 PM
Subject: Re: [bf1942] Linux Server Lags


> Sorry for the length here; I was writing this while troubleshooting.
> Hopefully others can glean some useful information from this.
>
> My server started lagging with just 2 players (one local, one internet).
> Just after the server started, there was no lag -- but after running for a
> while, it became progressively worse.  Running in COOP (which is broken
> anyway) seemed to exacerbate the problem; in CQ mode, it took longer for
the
> lag to become annoying.
>
> After the server finished loading, it consumed a fair amount of CPU (29.5%
> in this example) even when no players are connected:
>
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 21722 root      12   0 91808  89M 17036 R    29.5 11.8   1:37
bf1942_lnxded
> 21727 root       9   0 91808  89M 17036 S     0.0 11.8   0:00
bf1942_lnxded
> 21728 root       9   0 91808  89M 17036 S     0.0 11.8   0:00
bf1942_lnxded
>
> Originally, I chalked the problem up the server being early BETA, and
> figured it would get better as debug code was removed.  I didn't pay much
> attention to all of the talk about game.setServerIP setting, because it
> seemed to be primarily related to problems for systems with multiple
NIC's,
> or GameSpy/ASE woes.  Because I have only one NIC and don't want to be
seen
> in Gamespy or ASE anyway, I left the setting blank.
>
> I just tried putting a valid IP in there (representing my public IP). Now,
> with no players connected (CQ mode):
>
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 21888 johnj      9   0 85328  83M 15940 S     0.0 11.0   0:35
bf1942_lnxded
> 21889 johnj      9   0 85328  83M 15940 S     0.0 11.0   0:00
bf1942_lnxded
> 21890 johnj      9   0 85328  83M 15940 S     0.0 11.0   0:00
bf1942_lnxded
>
> Much better (idling at 0% CPU).  But if left unattended for about 10
> minutes, CPU on the first process climbs right back up around 30% and
stays
> there for about five minutes.  Based on my non-scientific observations,
this
> would happen at 10 minute intervals for 5 minutes at a time.  Ugh.
>
> So, as a wild guess -- I think Gamespy or some related timeout/heartbeat
> process is part of the lag problem.  I tinkered with the
game.serverInternet
> setting, but it seems to simply tell the server to bind to Gamespy on a
> different port (1=23000, 0=22000).
>
> So the moral of the story -- make sure game.setServerIP is not blank!
Also
> make sure the server can "bind" to Gamespy correctly (i.e. without a
> firewall getting in the way).  I cannot find a way around the lag cycle
> every 5 mintutes for those of us that don't want to connect to Gamespy at
> all -- it happens even if the server is setup for LAN-only.  I finally
> settled on the following settings to minimize CPU spikes:
>
> ----------------------------------------------------------------------
> ServerSettings.con
> ----------------------------------------------------------------------
> game.serverInternet 0
> game.setServerIP <public-IP>
>
> ----------------------------------------------------------------------
> Firewall
> ----------------------------------------------------------------------
> udp allow 22000
>
> On a side note, memory consumption by each process dropped from 83MB to
75MB
> in this configuration.  I haven't tested this with any players yet -- I'll
> let you know if this results in any sigificant reductions in lag for me.
>
> John




More information about the Bf1942 mailing list