Memory leak in .4 dedicated server.
- compguygene
- Adjust Outside Corner Grinder
- Posts: 2346
- Joined: Thu Aug 21, 2008 12:09 pm
- Location: Cleveland, Ohio
- Contact:
Memory leak in .4 dedicated server.
After putting up a single gameserver running a current trunk build on an Ubuntu 14.04 VPS, I noticed that the next day I was nearly out of memory. I reset the VPS, and resource consumption went down to something normal. I checked back 2 hours later, and an additional approximately 100mb of memory had been consumed. To ensure that it was the .4 server, I shut down any other gameservers I was running. Tested it again, and got the same results. I think that this may have been reported in the past, as far back as .3.1, but it seems it has not been addressed, or at least not fully addressed.
Armagetron: It's a video game that people should just play and enjoy
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Re: Memory leak in .4 dedicated server.
Use DEDICATED_IDLE, assuming it's not removed in 0.4. Then you can just have a looped bash script reboot it when it shuts down. That's how I've always run mine, and how Rx's are run, and probably most others. Sty+CT has a default on DEDICATED_IDLE. Maybe it can be shut off? I've never tried, in fact I set mine lower than default.
- compguygene
- Adjust Outside Corner Grinder
- Posts: 2346
- Joined: Thu Aug 21, 2008 12:09 pm
- Location: Cleveland, Ohio
- Contact:
Re: Memory leak in .4 dedicated server.
I understand that, and I am setting DEDICATED_IDLE 1. I just wanted to report the apparent memory leak so the devs know about it in case the were either not aware or had forgotten.
Armagetron: It's a video game that people should just play and enjoy
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Re: Memory leak in .4 dedicated server.
That's fine. I just wanted to give you something that would help ya keep it going. On the other hand, the fact that it exists makes me think they know about it.compguygene wrote:I understand that, and I am setting DEDICATED_IDLE 1. I just wanted to report the apparent memory leak so the devs know about it in case the were either not aware or had forgotten.
Re: Memory leak in .4 dedicated server.
Can you post the configuration of the server? Simple initial tests came up mostly empty, and my debug builds have our simple leakfinder always active.
- compguygene
- Adjust Outside Corner Grinder
- Posts: 2346
- Joined: Thu Aug 21, 2008 12:09 pm
- Location: Cleveland, Ohio
- Contact:
Re: Memory leak in .4 dedicated server.
Before giving you the config, I thought it might be a good idea to reproduce exactly what had happened and document it as objectively as possible for you. This server was setup initially without any DEDICATED_IDLE, which I normally do set to DEDICATED_IDLE 1. The following was obtained from the command line just after rebooting the VPS.
Approximately 9 hours later:
This is nowhere near the memory consumption that I had initially reported. I realized that I had corrected a few errors in the scripts that control my servers that may have caused some problems. Now the scripts are just simple start scripts very similar to the ones on the wiki on the page "Running Multiple Servers on a Linux Computer". With an increase of only 20mb in 9 hours, that is not nearly as bad, but still worth reporting.
Here is the config.
server_info.cfg
settings_custom.cfg
wwauth-0.2.cfg only has commands related to authentication of users, so I am not putting it here unless you need me to.
threetmft.cfg
Code: Select all
Fri Jan 30 15:32:10 UTC 2015
compguygene@theserverpharm:~$ free -m
total used free shared buffers cached
Mem: 987 173 814 0 26 53
-/+ buffers/cache: 92 895
Swap: 1023 0 1023
Code: Select all
Sat Jan 31 00:21:02 UTC 2015
compguygene@theserverpharm:~$ free -m
total used free shared buffers cached
Mem: 987 198 788 0 35 62
-/+ buffers/cache: 101 886
Swap: 1023 0 1023
Here is the config.
server_info.cfg
Code: Select all
TALK_TO_MASTER 1
MAX_IN_RATE 100
MAX_OUT_RATE 100
#DEDICATED_IDLE 1
CHAT_LOG 1
SERVER_PORT 4535
ANTI_SPOOF 1
LADDERLOG_WRITE_ALL 1
Code: Select all
SERVER_NAME 0xff7722 Wild West =0xff33003 Team Fortress0xff7722=
URL http://www.wwclan.net
MESSAGE_OF_DAY \n\
0xcc7722##############################################################\n\
0xcc7722 ## 0xff5500( \/\/ )( _)( ) / _)/ \( \/ )( _) (_ _)/ \\ 0xcc7722##\n\
0xcc7722 ## 0xff5500 \\ / ) _) )(__( (_( () )) ( ) _) )( ( () ) 0xcc7722##\n\
0xcc7722 ## 0xff5500 \/\/ (___)(____)\__)\__/(_/\/\_)(___) (__) \__/ 0xcc7722##\n\
0xcc7722 ## 0xff5500 The 0xcc7722##\n\
0xcc7722 ## 0xff5500 _ _ __ __ ___ _ _ ___ ___ ____ 0xcc7722##\n\
0xcc7722 ## 0xff5500 ( \/\/ )( )( ) ( \\ ( \/\/ )( _)/ __)(_ _) 0xcc7722##\n\
0xcc7722 ## 0xff5500 \\ / )( )(__ ) ) ) \\ / ) _)\__ \\ )( 0xcc7722##\n\
0xcc7722 ## 0xff5500 \/\/ (__)(____)(___/ \/\/ (___)(___/ (__) 0xcc7722##\n\
0xcc7722 ## 0xff5500 0xcc7722##\n\
0xcc7722 ## 0xff5500 Forum and Player Statistics at: 0x00bbccwwclan.net 0xcc7722##\n\
0xcc7722##############################################################\n\n
ROUND_CONSOLE_MESSAGE Check out the forums and fun at wwclan.net!
INCLUDE threetmft.cfg
INCLUDE wwauth-0.2.cfg
threetmft.cfg
Code: Select all
### WTF IS THIS: Three team fortress on a triangle map. Default to 5v5v5 because that's the number to count to.
# Warning: Older servers do not support the advanced match limits; you can still play but you'll have worse match limits.
# Reset all physics to default
MAP_FILE VOV/fortress/Hexagon-1.1.aamap.xml(http://www.trontimes.tk/repository/files/VOV/fortress/Hexagon-1.1.aamap.xml)
ARENA_AXES 6
GAME_TYPE 1
# Notable physics changes compared to normal fort:
# - sharper turns (hey we don't make clunky 90° ones anymore, ought to be quicker now)
# - a bit sharper turns on full speed
# - rim wall gives speed now (so you can go places; less than player walls though)
# - more brake reservoir: +40% in single brakings, +100% over time if you use it regularly
# - speed is kept up more (because speed is good, also you will probably need the brake now)
# - +20% rubber wall shrink (so the defender can jump out at you more and has more leniency on turns)
# - rubber usage at fast speeds is slightly better, but speedy grinds are still inferior to braked ones
# - spaced out team spawns for more tactics
###############################
### Zone settings + revenge ###
###############################
# if zone gets killed, let players alive but kill them off after a while (30sec)
# full revenge mode, so even when there's only one zone left there's revenge to get
fortress_survive_win 0
fortress_conquered_win 0
fortress_collapse_speed 0.0333
fortress_conquered_kill_ratio 1
FORTRESS_CONQUEST_DECAY_RATE 0.1
FORTRESS_CONQUEST_RATE 0.25
FORTRESS_DEFEND_RATE 0.3
FORTRESS_CONQUEST_TIMEOUT -1
### gank settings A#vsD#: 1v0=6s 2v1=10s 3v1=3s 3v2=20s 4v3=even
FORTRESS_MAX_PER_TEAM 1
SPAWN_POINT_GROUP_SIZE 3
# spaced out team spawns for more tactics
SPAWN_WINGMEN_BACK 7
SPAWN_WINGMEN_SIDE 3
#####################
### Team Settings ###
#####################
ALLOW_TEAM_NAME_PLAYER 0
ALLOW_TEAM_NAME_COLOR 1
TEAM_BALANCE_WITH_AIS 0
TEAM_MAX_PLAYERS 5
TEAM_MIN_PLAYERS 1
TEAM_MAX_IMBALANCE 2
TEAMS_MAX 3
TEAMS_MIN 2
BUG_COLOR_OVERFLOW 0
##########################
### Scoring and Limits ###
##########################
# idfk
FORTRESS_CONQUERED_SCORE 7
SCORE_WIN 5
SCORE_KILL 2
SCORE_DIE 0
SCORE_SUICIDE 0
# if the server supports them, these should be nice!
LIMIT_ROUNDS 15
LIMIT_TIME 120
LIMIT_SCORE 100
LIMIT_SCORE_MIN_LEAD 20
LIMIT_ADVANCE 65
######################
### Kill Detection ###
######################
# same as normal fort
ENEMY_SUICIDE_TIMEOUT 10.0
ENEMY_CURRENTTIME_INFLUENCE 0.5
ENEMY_TEAMMATE_PENALTY 9.5
ENEMY_DEAD_PENALTY 0.0
ENEMY_CHATBOT_PENALTY 0.0
######################
### Cycle Settings ###
######################
# these feel good and not clunky to me
CYCLE_SPEED 30
CYCLE_SPEED_DECAY_ABOVE 0.09
CYCLE_SPEED_DECAY_BELOW 4
CYCLE_DELAY 0.0865
CYCLE_DELAY_TIMEBASED 0.85
CYCLE_TURN_SPEED_FACTOR 0.972
CYCLE_ACCEL 20
CYCLE_ACCEL_RIM 0.7
CYCLE_BRAKE 30
CYCLE_BRAKE_DEPLETE 0.7
CYCLE_BRAKE_REFILL 0.14
CYCLE_RUBBER 5
CYCLE_RUBBER_WALL_SHRINK 1.2
CYCLE_RUBBER_TIMEBASED 0.15
CYCLE_WALL_NEAR 4.5
WALLS_LENGTH 400
WALLS_STAY_UP_DELAY 6
EXPLOSION_RADIUS 1.5
CYCLE_ACCEL 20
CYCLE_ACCEL_RIM 0.7
CYCLE_BRAKE 30
CYCLE_BRAKE_DEPLETE 0.7
CYCLE_BRAKE_REFILL 0.14
CYCLE_RUBBER 5
CYCLE_RUBBER_WALL_SHRINK 1.2
CYCLE_RUBBER_TIMEBASED 0.15
CYCLE_WALL_NEAR 4.5
WALLS_LENGTH 400
WALLS_STAY_UP_DELAY 6
EXPLOSION_RADIUS 1.5
########################
### Winzone Settings ###
########################
# a death zone just to scare :D
WIN_ZONE_INITIAL_SIZE 40
WIN_ZONE_EXPANSION 0
WIN_ZONE_MIN_LAST_DEATH 0
WIN_ZONE_MIN_ROUND_TIME 600
WIN_ZONE_RANDOMNESS 0
WIN_ZONE_DEATHS 1
##############################
### Single Player Settings ###
##############################
SP_GAME_TYPE 1
SP_TEAM_MAX_PLAYERS 3
SP_TEAM_MIN_PLAYERS 3
SP_TEAMS_MAX 5
SP_TEAMS_MIN 3
SP_WIN_ZONE_MIN_ROUND_TIME 300
SP_WALLS_LENGTH 400
SP_EXPLOSION_RADIUS 2
Armagetron: It's a video game that people should just play and enjoy
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Re: Memory leak in .4 dedicated server.
Thanks. Looks like first, I'll have to fix a bug that breaks debug recordings on 0.4 sometimes.