Opened 12 years ago
Last modified 11 years ago
#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: | Patch: |
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 (2)
Change History (12)
by , 12 years ago
Attachment: | mainlog.html added |
---|
by , 12 years ago
Attachment: | system_info.txt added |
---|
comment:2 by , 12 years ago
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 by , 12 years ago
Priority: | Should Have → Must Have |
---|---|
Summary: | suspect huge memory leak → suspect huge memory leak, memory not free during and at the end of a party |
comment:4 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
it seem time warp is the truly the bad guy in this story… so i change the name of the ticket…
comment:8 by , 12 years ago
Keywords: | time warp memory added |
---|---|
Priority: | Must Have → Nice to Have |
Summary: | suspect huge memory leak, memory not free during and at the end of a party → Improve time warp in order not run out of memory |
Type: | defect → enhancement |
comment:9 by , 12 years ago
Milestone: | Alpha 11 → 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.
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
don't know if that can help, but now it's said ;)