404rq/GTW-RPG

Potential memory leak

Opened this issue · 6 comments

paa93 commented

While focusing on keeping the CPU usage low there hasn't been much optimization in the memory usage, this should be optimized before the final 3.0 release, although ~200MB during regular usage doesn't sound much it's still more than alternate game modes and should be reduced if possible.

paa93 commented

Progress so far:

  • Merging resources: GTWcivilians with GTWteam and GTWrank
  • reverting bots to it's original resource
  • Switching databases to MySQL

Average memory usage has been reduced with 20% and it doesn't seem to increase radically.

I think it's the amount of resources causing the relatively high memory usage and some object heavy ones like house and business system. I'll investigate further to see if I can find anything else

By looking at the performance browser I'd say it's the amount of resources as well, we should reduce the amount and merge as much as possible. GTWcivilians for instance could handle all civilian jobs, GTWshops (new) should handle all the shops from ammu nation, hardware, fastfood, clothes, robbery and eventual new shops like sex shops, restaurants, barber shops and gym's

paa93 commented

More resources have been merged and thus the memory usage lowered to acceptable ~200MB (Tested on Linux Debian 8.5, server version 1.5.2)

Should I merge some resources too such as utility stuff which can be done in any other resource?
edit: memory leak issue should be solved asap.

paa93 commented

Some basic stuff can be included into GTWcore so that's a goal we're trying to reach and reducing the amount of resources would also reduce the memory usage. But some resources needs optimization too.