Ticket #1409 (new enhancement)
Improve time warp in order not run out of memory
| Reported by: | rogue-spectre | Owned by: | |
|---|---|---|---|
| Priority: | Nice to Have | Milestone: | Backlog |
| Component: | Core engine | Keywords: | time warp memory |
| Cc: |
Description
Hi,
I'm little slow to play so my games can take one hour… i've 4go of ram and an nvidia gforce gt 520M with 1go. I've experience for minimum two times slowdows of the game after a long period of games, i thought it was due to a huge amount of people on the map… but when i return to my deskto, i saw that the 4go of my ram where full + i was swapping also. So i think something may leak somewhere. I saw that there is some tricks to try to locate problems like this http://trac.wildfiregames.com/wiki/EngineProfiling
but i don't know where to start… valgrind would be nice to use but i know it's time consuming. I give you my system_info.txt, if you need a log or anything else tell me.
Have a nice day
Attachments
Change History
comment:1 Changed 13 months ago by rogue-spectre
precision : i'm running a debian sid, with the technology "optimus" so i use bumblebee to be able to use my gforce and i run the game like this
optirun ./pyrogenesis
don't know if that can help, but now it's said ;)
comment:2 Changed 12 months ago by rogue-spectre
hi,
I've to perform an other test to see if the problem is related with time wrapping (i doubt the problem is here), because i use it in order to speed up the game, but i can't do it before next week. So far i think i can tell the problem doesn't not come from optirun because i just tried without it and the situation is the same. I used "median oasis 3", but i think the problem can be experimented with other maps.
- So when i run the game i can see that the memory use increase, slowly but never decrease.
- I was expecting a drop of memory use at the end of the party… but no, i won and i killed almost all my units, but no drop in memory use.
- When i return to the menu, no drop in memory use.
- I perform an other test, at the end of my party with all my ram used, i saved the party, quit the game, restart and load the saved game, here my memory use was like at the beginning of a new party but not like it was when i saved the party.
- Other test, just start a party, quit, start an other on a other map, quit… memory use increase, no decrease.
- I was hoping valgrind could tell me something… but no indication from this tool… maybe i've to compile with debug options for this.
- My conclusion : the memory is free when one leave the game but not a party
PS : i can't make test with valgrind without optirun… game freeze
comment:3 Changed 12 months ago by rogue-spectre
- Priority changed from Should Have to Must Have
- Summary changed from suspect huge memory leak to suspect huge memory leak, memory not free during and at the end of a party
comment:4 Changed 12 months ago by Philip
If you mean you use the "Enable time warp" option, then it's intentional that it uses lots of memory - it saves the game state every few seconds and keeps that in memory forever (to allow you to jump back in time). So it's a feature, not a bug :-)
It might be nice if we did something like compress the state to reduce the memory usage, if that's fast enough.
If you want to increase the game speed without using the time-warp mode, open the in-game console (press F9) and run e.g. Engine.SetSimRate(10) to go 10x normal speed, which shouldn't use any extra memory.
comment:5 Changed 12 months ago by rogue-spectre
hum… thank you for this usefull information, so i'will try without "enable time warp" during next week (maybe before) to confirm that.
nice day ;)
comment:6 Changed 12 months ago by fabio
Maybe there should be a GUI interface for Engine.SetSimRate? so users (like myself) don't abuse the time warp...
EDIT: there is already ticket #785 for this.
comment:7 Changed 12 months ago by rogue-spectre
it seem time warp is the truly the bad guy in this story… so i change the name of the ticket…
comment:8 Changed 12 months ago by rogue-spectre
- Keywords time warp memory added
- Priority changed from Must Have to Nice to Have
- Type changed from defect to enhancement
- Summary changed from suspect huge memory leak, memory not free during and at the end of a party to Improve time warp in order not run out of memory
comment:9 Changed 12 months ago by k776
- Milestone changed from Alpha 11 to Backlog
Moving into backlog. Time warp is a debug tool, not intended for game usage. So it's nothing something we'll actively support/change unless we need to in order to test something.
comment:10 Changed 5 months ago by ben
In 12990:
