Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
07-27-2007, 02:09 AM
(This post was last modified: 07-27-2007, 02:49 AM by Pazuzu.)
Hi,
I am running a 100tick srcds server for CS:S on a Fedora Core 4 box, spec:
Intel Celeron 2.66GHz
512MB RAM
10mbit unmetered network connection
The server is capped to 12 players, and there's normally around 8 players on it. The problem I'm having is that regardless of player count, everyone playing gets a lag spike whenever a player joins or leaves. It's twice as bad when someone rejoins, because there are 2 lag spikes in quick succession. I was wondering whether anything could be done about it. I'm thinking that the bottleneck in the machine spec is the RAM. Frustratingly the server runs smoothly except for the join/leave lag, so my guess is it lags when srcds swaps out memory so it can allocate more for the the newly joining player.
Any thoughts, or commands that you know of that might help to calm the spikes?
Posts: 700
Threads: 19
Joined: May 2007
Reputation:
0
07-27-2007, 02:34 AM
(This post was last modified: 07-27-2007, 02:40 AM by Muppet.)
Sounds suspicious - but those specs *shouldn't* be causing that much problem. Do you run a custom kernel for >100fps server side? If not, you could recompile a 1000hz kernel and see what happens.
Might be an idea to try a full format of the HD and reinstall the OS with a vanilla kernel and see if the same problem occurs. If the problem still occurs, you could even try another kernel and if that fails.. then would probably need to update hardware.
But, those specs that you mentioned, shouldn't be causing lag spikes like that. I had a 2ghz P4 a while ago, same amount of ram with a 100mb unmetered line - no lag spikes.
Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
07-27-2007, 02:43 AM
(This post was last modified: 07-27-2007, 02:45 AM by Pazuzu.)
Thanks for the reply.
Unfortunately it's not my machine so I'm unable to reformat. Is there anything I can do to srcds specifically, commands, or uninstalling and re-installing using hldsupdatetool maybe?
And I forgot, here's the kernel version:
Linux version 2.6.18-1.2869.fc6 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.1 20061011 (Red Hat 4.1.1-30)) #1 SMP Wed Dec 20 14:51:46 EST 2006
Posts: 700
Threads: 19
Joined: May 2007
Reputation:
0
07-27-2007, 02:45 AM
(This post was last modified: 07-27-2007, 02:46 AM by Muppet.)
You could try a fresh install of srcds with no plugins. I doubt theres any commands you could enter in srcds to help with this problem.
Trying running the server 66 tick and see if the problem still occurs (just to rule out if -tickrate 100 being a problem on your machine)
Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
Ok I'll try a reinstall of srcds.
Thanks for your speedy help
Posts: 700
Threads: 19
Joined: May 2007
Reputation:
0
Seems other people have been getting lag spikes with the 2.6.18 kernel (although not truely confirmed - just specualtion). They have said that downgrading to 2.6.8 or even 2.5.6 has sorted the problem for them.
The issue has only occurred recently (in the last few updates) so you could just wait it out and see as there has just been a new beta released which should hopefully sort all these problems.
Posts: 22
Threads: 0
Joined: Oct 2006
Reputation:
0
Hi
Try to writhe top in a console and post it here.
Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
The CPU load is OK, if that's what you wanted to know. It reaches about 30% with 6 players, and doesn't seem to go over 50% even with 12.
Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
Muppet Wrote:Seems other people have been getting lag spikes with the 2.6.18 kernel (although not truely confirmed - just specualtion). They have said that downgrading to 2.6.8 or even 2.5.6 has sorted the problem for them.
The issue has only occurred recently (in the last few updates) so you could just wait it out and see as there has just been a new beta released which should hopefully sort all these problems.
Yeah, it does seem to have come around recently - getting worse in the last week or so. I think I'll take your advice and wait till the next release to see if it's fixed before I do anything drastic.
Posts: 22
Threads: 0
Joined: Oct 2006
Reputation:
0
it was the load on the ram i want to know.
Posts: 700
Threads: 19
Joined: May 2007
Reputation:
0
07-27-2007, 03:35 AM
(This post was last modified: 07-27-2007, 03:40 AM by Muppet.)
top is a bad way to view memory usage on a linux system. Linux, by default, uses up as much ram as possible (but most of this actually acts as cache therefore not true representation of usage).
One way i've found is to type 'free' into a terminal:
Code:
total used free shared buffers cached
Mem: 514508 508384 6124 0 728 295456
-/+ buffers/cache: 212200 302308
Swap: 995988 230280 765708
Then to check your ram usage, look at Mem section and take away the cached amount from the free. On this it would be 508384 - 295456 = ~208MB ram used.
Posts: 22
Threads: 0
Joined: Oct 2006
Reputation:
0
here is a dump of my server when i use top
top - 19:46:28 up 4 min, 2 users, load average: 0.08, 0.13, 0.06
Tasks: 77 total, 1 running, 76 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.2% sy, 0.0% ni, 99.8% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 2065256k total, 241192k used, 1824064k free, 27548k buffers
Swap: 2031608k total, 0k used, 2031608k free, 108692k cached
Posts: 38
Threads: 3
Joined: Jul 2007
Reputation:
0
07-27-2007, 04:15 AM
(This post was last modified: 07-27-2007, 04:17 AM by Pazuzu.)
Code:
total used free shared buffers cached
Mem: 506328 500180 6148 0 2328 173256
-/+ buffers/cache: 324596 181732
Swap: 522072 160216 361856
So that's 500180 - 173256 = 326924 = ~319MB ?
(And that's with 7 people on the server)
And from top:
top - 19:15:53 up 3 days, 10:43, 1 user, load average: 0.77, 0.65, 0.47
Tasks: 132 total, 4 running, 128 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.9%us, 1.7%sy, 0.0%ni, 80.1%id, 0.7%wa, 0.0%hi, 1.7%si, 0.0%st
Mem: 506328k total, 500096k used, 6232k free, 2100k buffers
Swap: 522072k total, 160216k used, 361856k free, 172908k cached
Posts: 700
Threads: 19
Joined: May 2007
Reputation:
0
Aye, 319mb sounds about right on 512MB ram. I wouldn't think it would jump much higher with 12 people on, certainly not above 512MB where virtual memory would be used.
Can only be kernel/OS related or this srcds bug as far as i can see.
Posts: 22
Threads: 0
Joined: Oct 2006
Reputation:
0
i had the same when i was running fc 4 ,it eats up a lot of swap memory.
and i think that's why the lag spikes.
|