dripton / Slugathon

Clone of the old Avalon Hill fantasy wargame Titan, using Python / PyGTK / Twisted
https://github.com/dripton/Slugathon/wiki
8 stars 2 forks source link

Server leaks memory #165

Closed dripton closed 12 years ago

dripton commented 12 years ago

The server gradually leaks memory if a lot of games are played. top says it starts at about 114 MB virtual, 57 MB resident. But after 26 games it's up to 462 MB virtual, 404 MB resident. It needs to stay under 256 MB even after a huge number of games, if we want to host the server on a cheap 256 MB VPS.

dripton commented 12 years ago

Upon further review, I don't think it's that bad. I just ran 100 stresstest games on CPython 2.7.2 on x86, and smem said USS 25300 PSS 26966 RSS 32664. IOW, the server was only using about 27 MB, which is no problem. A previous run of 50 games also peaked around 27 MB.

dripton commented 12 years ago

204 games, PSS 28 MB