Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
15 stars 13 forks source link

spads is using an abnormal amount of ram #3

Closed DuCnuke closed 10 years ago

DuCnuke commented 10 years ago

Previously spads was using 10-30MB ram, constantly. Recently, the usage has risen to 150-200MB ram. i am unsure if it's a memory leak, or some abnormally large file being loaded in ram. I tried to delete chat log, which was the biggest file, but the usage remained the same. User database is only 2 MB large, so i'd tend to exclude it.

Yaribz commented 10 years ago

Which values do you use for userDataRetention and autoLearnMaps settings on your server? What are the sizes of the files in your varDir directory? Is the memory usage abnormal from the start or does it increase progressively? Do you use custom plugins? Did you try without plugins?

DuCnuke commented 10 years ago

userDataRetention:-1;-1;-1 autoLearnMaps:0

2.5M var/revenge 2.4M var/ffa 60K var/plugins 173M var/log/chat 200M var/log 1.6M var/testing 1.2M var/duel 2.5M var/reborn 210M var/

starts with 130MB, then increase progressively

AutoSpec (version 0.1) BlockVoteSpam (version 0.1) KickBanNextGame (version 0.1) CustomAliases (version 0.1) DownloadArchives (version 0.1) FirstWelcomeMsg (version 0.1) Resign (version 0.1)

I'll try disabling plugins for now.

DuCnuke commented 10 years ago

host: No plugin loaded. Still the same problem.

Yaribz commented 10 years ago

High mem usage is to be expected when user data have been stored for a very long time when no limit is used on user data retention periods (fast access data used by Perl can take much more memory than serialized data), but maybe not that high though.

Let's try to eliminate the userData as possible cause of big mem usage:

If the mem usage is still high, would it be possible to have a temporary shell access to the server with permissions to run/stop/edit files of such a buggy SPADS instance?

DuCnuke commented 10 years ago

JACKPOT!!! it's user data retention! what values do you suggest for a non invasive behaviour? The host access is open for devs, where i can tell you user and pass?

Yaribz commented 10 years ago

The max possible values for userDataRetention entirely depend on your server config.

You can try setting userDataRetention to "365;50;50" for example, and if the memory usage is still too high for your system you can try reducing the values again and so on.

User data pruning only occurs every dataDumpDelay minutes or when SPADS is stopped. So to easily check the effect of a new userDataRetention value on memory usage you need to restart SPADS twice after editing the config file (once for pruning the userData file, and another time to load the new userData file).

You can find an email to contact me in the header of every SPADS source file, but I think finally there is no need for this problem?

DuCnuke commented 10 years ago

Yep seem not!!! :) Tnk you very much!!!

DuCnuke commented 10 years ago

The problem is related with the huge amount of data from steam players. The file is full of nicks, reducing to 5-7 days makes all the hosts usable :)