SRCDS Steam group


[Resolved] Possible memory leak?
#1
Just setup a dedicated server today, specs and info below:

BASIC INFO
Server OS: Ubuntu 10.4.1 LTS 32 bit
Processor: Intel P4 3.0 Ghz hyperthreaded
Ram: 1 GB
Game(s): Counter-Strike Source
Start Up Command: ./srcds_run -game cstrike -ip XXXXXXXXXXX -port 27015 -maxplayers 10 -tickrate 66 +fps_max 0 +map de_dust2 +exec server.cfg +tv_enable 1 +tv_maxclients 25 +tv_port 27020 -autoupdate&
Admin Mods: zBlock

Granted the server is really low spec but its cheap and im only running 1 gaming server (private match server for clan). The OS was installed today. Please note this also happened on another server with 2gb ram, dual core 2.2ghz on centos 5.5.

I notice that the memory leak happens when the server changes map, once i reboot the css server using "rcon exit" I get all memory back again. Sometimes I would be left with 16k left and 1 gb used for a 11 slot css server, this is the only application running on the server.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1240 server01 20 0 464m 367m 18m S 26 36.7 12:19.65 srcds_linux

The memory usage would go upto 60%. Anyone else having the same problem, is this a known issue?

Kind Regards,
Wayne
Reply
#2
in the line presumably copied from top I see your server has 464 MB reserved memory. that is much indeed, but it could be right for some big maps and maybe with the enabled tv server (I don't know how much memory that takes). the question is, does the memory increase at every map change, even if you change back to the start map (dust2 in your case)?

I don't see any obvious mistakes why your server should have a memory leak. I also have zblock running on my match server (like many others) and I don't have such leaks. the machine specs cannot be the reason, also I would say the Linux cannot. the only difference I see is the TV server, I have only one relay slot. but I cannot imagine either that this should make a difference... anyway you might want to try it...

has the other server a 64 bit version of linux installed? (I know I said it should not make a difference there, but...)
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#3
(08-11-2010, 06:12 PM)BehaartesEtwas Wrote:  in the line presumably copied from top I see your server has 464 MB reserved memory. that is much indeed, but it could be right for some big maps and maybe with the enabled tv server (I don't know how much memory that takes). the question is, does the memory increase at every map change, even if you change back to the start map (dust2 in your case)?

I don't see any obvious mistakes why your server should have a memory leak. I also have zblock running on my match server (like many others) and I don't have such leaks. the machine specs cannot be the reason, also I would say the Linux cannot. the only difference I see is the TV server, I have only one relay slot. but I cannot imagine either that this should make a difference... anyway you might want to try it...

has the other server a 64 bit version of linux installed? (I know I said it should not make a difference there, but...)

This server and the other server is 32 bit version of linux. The memory seems to creep up and up after every map change. If you change it back to de_dust2 then it still creeps up. The only way to get the memory back is by restarting all cs servers on the dedicated server.

I will update with tests in around 10 minutes.
Reply
#4
///// DEDICATED SERVER REBOOTED, 2 SERVERS STARTED WITHOUT PLAYERS CONNECTING

Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 8.2%us, 2.2%sy, 0.0%ni, 89.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 605116k used, 419780k free, 125580k buffers
Swap: 1951736k total, 0k used, 1951736k free, 237688k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1571 server02 20 0 220m 121m 18m S 12 12.1 9:24.69 srcds_linux
1559 server01 20 0 176m 77m 18m S 8 7.8 6:07.91 srcds_linux


///// AFTER 1 MAP CHANGE ON SERVER01 WITHOUT PLAYERS CONNECTING


top - 08:18:38 up 6:48, 1 user, load average: 0.50, 0.50, 0.44
Tasks: 78 total, 2 running, 76 sleeping, 0 stopped, 0 zombie
Cpu(s): 10.6%us, 2.8%sy, 0.0%ni, 86.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 684120k used, 340776k free, 126224k buffers
Swap: 1951736k total, 0k used, 1951736k free, 290132k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1571 server02 20 0 220m 121m 18m R 15 12.1 9:31.13 srcds_linux
1559 server01 20 0 201m 102m 18m S 12 10.3 6:14.15 srcds_linux


///// AFTER 2 MAP CHANGE ON 2 SERVERS WITHOUT PLAYERS CONNECTING


top - 08:20:48 up 6:50, 1 user, load average: 0.65, 0.56, 0.47
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 27.6%us, 2.0%sy, 0.0%ni, 70.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 834396k used, 190500k free, 127076k buffers
Swap: 1951736k total, 0k used, 1951736k free, 363152k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1571 server02 20 0 258m 160m 18m S 43 16.0 9:58.55 srcds_linux
1559 server01 20 0 235m 138m 18m S 16 13.8 6:33.55 srcds_linux


///// AFTER 2 MAP CHANGE ON 2 SERVERS WITHOUT PLAYERS CONNECTING


top - 08:23:24 up 6:53, 1 user, load average: 0.33, 0.46, 0.44
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.0%us, 2.3%sy, 0.0%ni, 90.5%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 1024896k total, 898428k used, 126468k free, 127148k buffers
Swap: 1951736k total, 0k used, 1951736k free, 397808k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1571 server02 20 0 295m 197m 18m S 10 19.7 10:36.99 srcds_linux
1559 server01 20 0 226m 129m 18m S 9 12.9 6:55.30 srcds_linux


///// AFTER 10 MINUTES WITHOUT PLAYERS CONNECTING


top - 08:34:29 up 7:04, 1 user, load average: 0.08, 0.22, 0.33
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 10.0%us, 2.0%sy, 0.0%ni, 88.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 901164k used, 123732k free, 127148k buffers
Swap: 1951736k total, 0k used, 1951736k free, 400396k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1571 server02 20 0 295m 197m 18m S 15 19.7 12:07.18 srcds_linux
1559 server01 20 0 226m 129m 18m S 9 12.9 7:52.90 srcds_linux


///// AFTER 10 MINUTES OF 2 PEOPLE PLAYING ON SERVER01, NO PLAYERS ON SERVER02


top - 08:49:37 up 7:19, 1 user, load average: 0.70, 0.68, 0.50
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.0%us, 1.7%sy, 0.0%ni, 83.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 905008k used, 119888k free, 127156k buffers
Swap: 1951736k total, 0k used, 1951736k free, 403952k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1559 server01 20 0 226m 129m 18m S 19 13.0 10:42.43 srcds_linux
1571 server02 20 0 295m 197m 18m S 14 19.7 14:30.08 srcds_linux


///// AFTER 10 MINUTES OF 1 MAP CHANGE AND 2 PEOPLE PLAYING ON SERVER01, NO PLAYERS ON SERVER02


top - 09:02:31 up 7:32, 1 user, load average: 0.60, 0.55, 0.49
Tasks: 78 total, 3 running, 75 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0%us, 2.2%sy, 0.0%ni, 72.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 923980k used, 100916k free, 127160k buffers
Swap: 1951736k total, 0k used, 1951736k free, 407024k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1559 server01 20 0 242m 145m 18m R 34 14.5 14:32.59 srcds_linux
1571 server02 20 0 295m 197m 18m R 20 19.7 16:34.00 srcds_linux


///// AFTER 10 MINUTES OF RUNNING ZBLOCK MATCH SCRIPT AND 2 PEOPLE PLAYING ON SERVER01, NO PLAYERS ON SERVER02


top - 09:09:44 up 7:39, 1 user, load average: 0.51, 0.60, 0.53
Tasks: 78 total, 3 running, 75 sleeping, 0 stopped, 0 zombie
Cpu(s): 19.6%us, 2.2%sy, 0.0%ni, 78.1%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 1024896k total, 927336k used, 97560k free, 127160k buffers
Swap: 1951736k total, 0k used, 1951736k free, 408764k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1559 server01 20 0 243m 146m 18m R 24 14.7 16:38.46 srcds_linux
1571 server02 20 0 295m 197m 18m R 20 19.7 17:44.52 srcds_linux


///// AFTER 10 MINUTES OF 2 PEOPLE DISCONNECTING AND NO PLAYERS AT ALL ON BOTH SERVERS


top - 09:19:03 up 7:49, 1 user, load average: 0.55, 0.46, 0.46
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 13.1%us, 2.0%sy, 0.0%ni, 84.7%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 1024896k total, 929692k used, 95204k free, 127164k buffers
Swap: 1951736k total, 0k used, 1951736k free, 410968k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1559 server01 20 0 243m 146m 18m S 16 14.7 18:10.74 srcds_linux
1571 server02 20 0 295m 197m 18m S 15 19.7 19:11.23 srcds_linux


///// AFTER 10 MINUTES OF BOTH SERVERS REBOOTED USING RCON EXIT AND NO PLAYERS CONNECTING


top - 09:29:08 up 7:59, 1 user, load average: 0.54, 0.50, 0.46
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 9.7%us, 2.5%sy, 0.0%ni, 87.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1024896k total, 785176k used, 239720k free, 127448k buffers
Swap: 1951736k total, 0k used, 1951736k free, 413668k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1899 server01 20 0 176m 77m 17m S 13 7.7 1:02.90 srcds_linux
1904 server02 20 0 220m 121m 18m S 12 12.1 1:05.36 srcds_linux


Can I remind everyone, both servers are configured the same. 11 slot private match servers with 25 slot SourceTV and fps_max 0. Is the above data normal? The way i see it, srcds_linux doesnt release memory it doesnt need especially when people disconnect from the server.

Kind Regards,
Wayne
Reply
#5
no this is not normal, as I said. I just tested on my war server. I did several map changes to different maps. The memory usage is always around 280 MB, depending on the map.

but sorry, I don't have a clue what could help you...
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#6
(08-12-2010, 06:00 PM)BehaartesEtwas Wrote:  no this is not normal, as I said. I just tested on my war server. I did several map changes to different maps. The memory usage is always around 280 MB, depending on the map.

but sorry, I don't have a clue what could help you...

Thanks mate, much appreciated.

Kind Regards,
Wayne
Reply
#7
Well I found the problem to my disappearing memory, SourceTV was on constant record. Someone set tv_autorecord 1, idiot.

Kind Regards,
Wayne
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)