SRCDS Steam group


Memory leak on TF2 srcds?
#1
My info
OS: Fedora 17
CPU: i7-2720QM 2.2GHz 4 cores 8 threads (hyperthreading enabled)
RAM: 12GB
Game: TF2, MVM with a custom popfile
Start command: ./srcds_run -console -game tf +map mvm_coaltown +maxplayers 32 -autoupdate
Admin mods: None - vanilla srcds

So basically the problem I had was my server had been running 24-48 hours. I came on and saw some people using it and joined them, and I found the whole experience rather choppy. I noted that when I started the server top showed approx 400M in the physical memory usage column. Here, with the choppy gameplay the memory usage had gone up to 3.1G and cputime was increasing. While I was googling for a fix, the server got stuck at 100% CPU and stopped responding. Memory usage was still 3.1G.

Is there any changelog I can find for srcds? Although after it has restarted it would have downloaded any update, but I would like to see a changelog or if thre has even been any update recently.

I've seen http://64bitvps.com/csgo/ticket/srcds-memory-consumption-increases-every-map-change-and-eventually-affects-server-fps/

Where it shows as the last post (approx 2 days ago) that a memory leak was fixed in dedicated server ... but as I said I cannot find this changelog. Any pointers would be appreciated.

Cheers
Reply
#2
(02-02-2013, 08:16 AM)yaxxie Wrote:  My info
OS: Fedora 17
CPU: i7-2720QM 2.2GHz 4 cores 8 threads (hyperthreading enabled)
RAM: 12GB
Game: TF2, MVM with a custom popfile
Start command: ./srcds_run -console -game tf +map mvm_coaltown +maxplayers 32 -autoupdate
Admin mods: None - vanilla srcds

So basically the problem I had was my server had been running 24-48 hours. I came on and saw some people using it and joined them, and I found the whole experience rather choppy. I noted that when I started the server top showed approx 400M in the physical memory usage column. Here, with the choppy gameplay the memory usage had gone up to 3.1G and cputime was increasing. While I was googling for a fix, the server got stuck at 100% CPU and stopped responding. Memory usage was still 3.1G.

Is there any changelog I can find for srcds? Although after it has restarted it would have downloaded any update, but I would like to see a changelog or if thre has even been any update recently.

I've seen http://64bitvps.com/csgo/ticket/srcds-memory-consumption-increases-every-map-change-and-eventually-affects-server-fps/

Where it shows as the last post (approx 2 days ago) that a memory leak was fixed in dedicated server ... but as I said I cannot find this changelog. Any pointers would be appreciated.

Cheers

You should shy away from using Fedora for a game server. It runs lots of packages by default which take away system resources. I host my server on Arch and my top shows only 256 mb of ram in use and the proc never hits 100%.
Reply
#3
(02-03-2013, 08:40 AM)jesuscakes Wrote:  You should shy away from using Fedora for a game server. It runs lots of packages by default which take away system resources. I host my server on Arch and my top shows only 256 mb of ram in use and the proc never hits 100%.

By default. I'm not using a default installation, I am using a minimal installation. Anything else you'd like to tell me about my choice of distro that doesn't relate to the question?
Reply
#4
Try running regular TF2 (not MvM), the memory leak might be MvM related.
Reply
#5
I suppose I can give that a go - how much bandwidth does one need for a regular 24 player server?
Reply
#6
So it turns out I don't see any leaking on a normal DM server .. it is indeed MvM related .. anyone has any ideas?
Reply
#7
(02-02-2013, 08:16 AM)yaxxie Wrote:  My info
OS: Fedora 17
CPU: i7-2720QM 2.2GHz 4 cores 8 threads (hyperthreading enabled)
RAM: 12GB
Game: TF2, MVM with a custom popfile
Start command: ./srcds_run -console -game tf +map mvm_coaltown +maxplayers 32 -autoupdate
Admin mods: None - vanilla srcds

So basically the problem I had was my server had been running 24-48 hours. I came on and saw some people using it and joined them, and I found the whole experience rather choppy. I noted that when I started the server top showed approx 400M in the physical memory usage column. Here, with the choppy gameplay the memory usage had gone up to 3.1G and cputime was increasing. While I was googling for a fix, the server got stuck at 100% CPU and stopped responding. Memory usage was still 3.1G.

Is there any changelog I can find for srcds? Although after it has restarted it would have downloaded any update, but I would like to see a changelog or if thre has even been any update recently.

I've seen http://64bitvps.com/csgo/ticket/srcds-memory-consumption-increases-every-map-change-and-eventually-affects-server-fps/

Where it shows as the last post (approx 2 days ago) that a memory leak was fixed in dedicated server ... but as I said I cannot find this changelog. Any pointers would be appreciated.

Cheers

Hello my friend...

NOTE: That SRCDS DON'T SUPPORT MULTI-THREADED CPU

after a reasearch that i made for that ... the only way to use the server without a big problems with limited 24 - 26 peoples is to

1) REGISTER YOUR GAME SERVER IN 1 CPU .. ( to don't jump to the other cpus )

Code:
taskset -c 0 ./srcds_run ...

note that cpus starts from 0 for first cpu , 1 for second cpu


2) ADD THE srcds_linux TO THE HIGH PRIORITY LIST..

INFO : http://www.srcds.com/db/engine.php?subaction=showfull&id=1103579727&archive=

if you need more help send email on ioannis@tavernarakis.eu
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
[Image: b_350_20_323957_202743_F19A15_111111.png]
Hellenic SF Gameservers To Do List
Reply
#8
(03-12-2013, 11:14 AM)Sakretsos Wrote:  Hello my friend...

NOTE: That SRCDS DON'T SUPPORT MULTI-THREADED CPU

after a reasearch that i made for that ... the only way to use the server without a big problems with limited 24 - 26 peoples is to

1) REGISTER YOUR GAME SERVER IN 1 CPU .. ( to don't jump to the other cpus )

Code:
taskset -c 0 ./srcds_run ...

note that cpus starts from 0 for first cpu , 1 for second cpu


2) ADD THE srcds_linux TO THE HIGH PRIORITY LIST..

INFO : http://www.srcds.com/db/engine.php?subaction=showfull&id=1103579727&archive=

if you need more help send email on ioannis@tavernarakis.eu

That didn't work. The server still leaked memory 'til it reached the 32-bit process limit and crashed.
Reply
#9
try to remove hard plugins ... that overload cpu .. cause srcds can't use more than 1 CPU
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
[Image: b_350_20_323957_202743_F19A15_111111.png]
Hellenic SF Gameservers To Do List
Reply
#10
(03-20-2013, 01:22 AM)Sakretsos Wrote:  try to remove hard plugins ... that overload cpu .. cause srcds can't use more than 1 CPU

I'm running srcds vanilla. And CPU usage isn't the real problem, the memory leak is, hence the title of the thread.
Reply
#11
I found the cause of the memory leak. What it is, is that actually all MvM servers leak memory, just at much, much, much slower rates that my server did.

I have a custom population file to create an "endless" wave, and as part of making sure the right amount of currency was dropped per spawn, I had to pre-specify the amount to spawn, and the amount of currency to be dropped by that wavespawn. To make it truly endless, I used stupidly large numbers of spawns (that in practice, nobody can hope to achieve, unless they are really mental).

As part of troubleshooting, I decided to do diffs between the official popfiles and my custom popfile (e.g search for syntax error or missing end-action etc). I noted the only real difference was that my spawn numbers were huge, and for a single wave. I also noted that between restarting waves, the server was jamming for a second or two - I had previously put this down to the population file being large and difficult to parse. But I also noted that the official file was larger than my own. Then I realised that the server might be doing something stupid .. pre-generating the entire wave and storing it in memory. The leak was occurring between wave-resets, and was leaking approx 100MB each time. So I tried something with the popfile - I reduced the order of magnitude of each spawncount (and the currencies) by two, and ran a test server. Now, there is no delay between wave restarts, and the server leaks 1MB of memory each reset, instead of 100MB.

I'd also run the test server with a different flavour of linux, and x86 instead of x64. Thus, I conclude that every (linux) MvM server leaks memory upon wave restart and is not distro or architechture specific, but it is in such tiny amounts that it would not be noticed over very many wave restarts even, and combined with server updates that force server restart, nobody practically suffers from this problem.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)