OpenTTD using 3.8 GB memory and still rising
Moderator: OpenTTD Developers
OpenTTD using 3.8 GB memory and still rising
Hi all! I'm back to this game. Don't know if you guys still remember me, but I'm going to play this game again in the following days.
I am now on a new computer and decided to see how fast it would go on a giant map 2048x2048 with 14 AIs. I started a game in 1950 and now in the year 2005 it has become incredibly sluggish. Mouse cursor only moves once per 3 seconds and memory usage is up to 3.8 GB.
I though a computer such as this would roll over OpenTTD but I guess I'm wrong.
EDIT: Ops, Computer specs - Intel Core i5 2500, AMD Radeon HD 6850, 12 GB RAM 1333 MHz CL9 Dual-channel, Windows 7 Ultimate 64-bit, 1TB Western Digital Caviar Blue.
I am now on a new computer and decided to see how fast it would go on a giant map 2048x2048 with 14 AIs. I started a game in 1950 and now in the year 2005 it has become incredibly sluggish. Mouse cursor only moves once per 3 seconds and memory usage is up to 3.8 GB.
I though a computer such as this would roll over OpenTTD but I guess I'm wrong.
EDIT: Ops, Computer specs - Intel Core i5 2500, AMD Radeon HD 6850, 12 GB RAM 1333 MHz CL9 Dual-channel, Windows 7 Ultimate 64-bit, 1TB Western Digital Caviar Blue.
Re: OpenTTD using 3.8 GB memory and still rising
a friend of mine in bio-computer-sciences once said: "why do you celebrate so much that computers get twice as fast? we will just use one atom more in the simulation, and it will bring it down to its knees."
Re: OpenTTD using 3.8 GB memory and still rising
3.3 GHz, up to 3.7 GHz with turbo
Re: OpenTTD using 3.8 GB memory and still rising
Currently 4.2 GB RAM, game year 2008
Re: OpenTTD using 3.8 GB memory and still rising
I remember you. 
Very big map and many AIs. This is behaviour to be expected.
Are you using vanilla OpenTTD or a patched version? If vanilla what version and if patched what patch?
What are the AIs you are running; each one is a program (script) running on top of OpenTTD. And some of them might slow down OpenTTD; sometimes because of wasting memory, sometimes because of not having optimized code (the same goes for patches).
Are you using many GRFs in your game?
Could you post your savegame please. That will tell us more than a thousend words.

Very big map and many AIs. This is behaviour to be expected.
Are you using vanilla OpenTTD or a patched version? If vanilla what version and if patched what patch?
What are the AIs you are running; each one is a program (script) running on top of OpenTTD. And some of them might slow down OpenTTD; sometimes because of wasting memory, sometimes because of not having optimized code (the same goes for patches).
Are you using many GRFs in your game?
Could you post your savegame please. That will tell us more than a thousend words.

-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Re: OpenTTD using 3.8 GB memory and still rising
"Turbo"? Is this 1992 or something?Samu wrote:3.3 GHz, up to 3.7 GHz with turbo

Sounds like one of the running AIs has a memory leak...
Re: OpenTTD using 3.8 GB memory and still rising
Oh just noticed there's a new version.That's a 1.2.0 savegame.
Using 4.5 GB RAM now, year 2010.
Using 4.5 GB RAM now, year 2010.
- Attachments
-
- Unnamed, 2010-03-26.sav
- (3.27 MiB) Downloaded 152 times
Re: OpenTTD using 3.8 GB memory and still rising
5.1 GB memory usage, game year 2016, but now I'm gonna sleep. Tomorrow I'll continue
Re: OpenTTD using 3.8 GB memory and still rising
try this:
- make a savegame
- go to the ingame console
- type stop_ai 1
- watch the memory and cpu usage
- repeat the previous two steps for numbers 2-15
- report the results to the respective AI authors.
Re: OpenTTD using 3.8 GB memory and still rising
Yes, it must be one or more of the AIs. I loaded the game on a much less powerful computer than yours, but without AIs. And then it runs just fine.
Re: OpenTTD using 3.8 GB memory and still rising
When I loaded the savegame today, it wasn't back to 5.1 GB usage, it was starting over.
It's year 2050, i saved game and now i'm gonna kill the AIs, though I would prefer if I could keep their vehicles, making them have no one controlling them.
Okay, memory usage:
1.723.916K - all
1.723.916K - stop_ai 1 - WARNING: Company is not controlled by an AI
1.723.916K - stop_ai 2 - AI stopped, company deleted - PathZilla (v6) with error but some vehicles (0/168/0/0)
1.724.092K - stop_ai 3 - AI stopped, company deleted - TeshiNet (v4) with error, Unnamed (0/0/0/0)
1.724.092K - stop_ai 4 - AI stopped, company deleted - BorkAI (v7) with error, Unnamed (0/0/0/0)
1.724.092K - stop_ai 5 - AI stopped, company deleted - Convoy (v11) alive with vehicles (0/1448/0/0)
1.724.092K - stop_ai 6 - AI stopped, company deleted - SynTrans (v10) alive with vehicles (0/32/0/0)
1.724.092K - stop_ai 7 - AI stopped, company deleted - Convoy (v11) alive with vehicles (0/1768/0/0)
1.724.092K - stop_ai 8 - AI stopped, company deleted - Terron (v203) alive with vehicles (0/2442/64/0)
1.724.092K - stop_ai 9 - AI stopped, company deleted - Denver & Rio Grande (v1) alive with vehicles (13/0/0/0)
1.358.388K - stop_ai 10 - AI stopped, company deleted - NoCAB (v498) alive with vehicles (0/0/7/0)
1.359.472K - stop_ai 11 - AI stopped, company deleted - StreetTraffic (v1) alive but no vehicles (0/0/0/0)
1.364.692K - stop_ai 12 - AI stopped, company deleted - NoCAB - Bleeding Edge Edition (v523) with error, Unnamed (0/0/0/0)
1.367.988K - stop_ai 13 - AI stopped, company deleted - MogulAI (v5900) alive with vehicles (0/5000/0/0)
389.536K - stop_ai 14 - AI stopped, company deleted - Terron (v203) alive with vehicles (0/1830/44/0)
325.180K - stop_ai 15 - AI stopped, company deleted - RoadRunner (v7) alive but no vehicles (0/0/0/0)
RoadRunner, Denver, Terron (AI
, PathZilla were the longest living companies, since 1950.
It's year 2050, i saved game and now i'm gonna kill the AIs, though I would prefer if I could keep their vehicles, making them have no one controlling them.
Okay, memory usage:
1.723.916K - all
1.723.916K - stop_ai 1 - WARNING: Company is not controlled by an AI
1.723.916K - stop_ai 2 - AI stopped, company deleted - PathZilla (v6) with error but some vehicles (0/168/0/0)
1.724.092K - stop_ai 3 - AI stopped, company deleted - TeshiNet (v4) with error, Unnamed (0/0/0/0)
1.724.092K - stop_ai 4 - AI stopped, company deleted - BorkAI (v7) with error, Unnamed (0/0/0/0)
1.724.092K - stop_ai 5 - AI stopped, company deleted - Convoy (v11) alive with vehicles (0/1448/0/0)
1.724.092K - stop_ai 6 - AI stopped, company deleted - SynTrans (v10) alive with vehicles (0/32/0/0)
1.724.092K - stop_ai 7 - AI stopped, company deleted - Convoy (v11) alive with vehicles (0/1768/0/0)
1.724.092K - stop_ai 8 - AI stopped, company deleted - Terron (v203) alive with vehicles (0/2442/64/0)
1.724.092K - stop_ai 9 - AI stopped, company deleted - Denver & Rio Grande (v1) alive with vehicles (13/0/0/0)
1.358.388K - stop_ai 10 - AI stopped, company deleted - NoCAB (v498) alive with vehicles (0/0/7/0)
1.359.472K - stop_ai 11 - AI stopped, company deleted - StreetTraffic (v1) alive but no vehicles (0/0/0/0)
1.364.692K - stop_ai 12 - AI stopped, company deleted - NoCAB - Bleeding Edge Edition (v523) with error, Unnamed (0/0/0/0)
1.367.988K - stop_ai 13 - AI stopped, company deleted - MogulAI (v5900) alive with vehicles (0/5000/0/0)
389.536K - stop_ai 14 - AI stopped, company deleted - Terron (v203) alive with vehicles (0/1830/44/0)
325.180K - stop_ai 15 - AI stopped, company deleted - RoadRunner (v7) alive but no vehicles (0/0/0/0)
RoadRunner, Denver, Terron (AI

Re: OpenTTD using 3.8 GB memory and still rising
Did you come to any conclusion to what was the problem?
Re: OpenTTD using 3.8 GB memory and still rising
Yes, as you can see he posted the game resource size each time after he killed an AI. You can now find how big the chunk of memory was each AI used. The names of the biggest AI's he also wrote in the last line of his post.
Re: OpenTTD using 3.8 GB memory and still rising
Erm... what I can say is that the biggest differences were after killing NoCAB (v498), from 1754 to 1358. The other one doesn't make sense to me. Killing the second Terron has freed nearly 1 GB memory, but when the first Terron was killed, it made no effect.
Re: OpenTTD using 3.8 GB memory and still rising
you should ask that in the respective threads in the AI forum
Re: OpenTTD using 3.8 GB memory and still rising
It could be pending events. AIEvents are shared between all AI instances and are freed when the last reference is destroyed. So, if one AI never queries events, they will stockpile. They will only be freed when all AIs are killed, which do not query events.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Who is online
Users browsing this forum: No registered users and 8 guests