Page 1 of 2

A Memory Usage Test

Posted: Sat Mar 17, 2007 5:47 am
by snoopy55
There has been alot of talk about how much memory this game needs, so I figured I'd run a map, gather some data, and let anyone wanting to know find out how their system does.

The map is Southwestern US. I ran it to full ownership. I got another 1Gb stick from my brother, so I now have 3Gb. So, what's happening?

The game still boggs down upon double track laying, and a little on single.
By the attached shot of the Windows Task Manager you can see the Memory Usage, the Peak Memory Usage, and the Virtual Memory Usage. I had 4Gb of virtual Memory set up. The CPU usage is reading 00 because I did an Alt-Tab. It usually runs 90 - 100%.

Now, load up the saved game into your \My Games\Sid Meier's Railroads!\Saves folder and do a Ctrl-Alt-Del to bring up the Task Manager. Start the game and load the saved game. Let it run for about 6 monthes as it takes a while for the game to get up to full memory usage. Add a double track between 2 points if you want, and time how long it takes for it to start up again. Note the points and time. Then Alt-Tab the game and note the information. (to get the columns you see, go to View and Select Columns)

At the bottom you will notice Commit Charge. Note the first number, and then note it again after you shut down the game. This also gives you a Memory usage. The number with the game off is your systems idol usage. Mine runs around 275 to 300. If this is high, you may have things running in the background and should do a Adaware and Spybot check. I'm about a week overdue myself.

Posted: Sat Mar 17, 2007 6:57 am
by gforce
i hope to see some results lateron,
i also try to avoid as much as possible double tracks and i believe it helps,
as you know, i try to avoid bridges, also overlapping bridges,
the good thing is that it looks natural,
the maybe draw-back on this, is that i've got more lights on tracks (4 more)) if i need to change from side with an x track, it's not really a X but more something like this:
I/
I
I
/I

, also i'm using alot of triangle tracks like this
I
/\
___
resulting into 3 lights (or even more) for that, but such tracks are pretty cool if the output on industries is much less and you've got alot of visits with a single train

Posted: Mon Mar 19, 2007 8:54 am
by universum
Once you get enough tracks into the game, laying new ones takes more time. I think it has little to do with memory but with number of combinations game must calculate, this number grows exponentially even when you put in some optimizations, .

In later game, it is not all that uncommon for game stop even for few seconds.

Reason why I think it does not have much to do with memory is that when the game "hangs" on my computer (1GB), it does not even touch the harddrive. I have another 2GB on the way and I wonder if I will see any difference.

Posted: Mon Mar 19, 2007 2:02 pm
by snoopy55
universum - that is the whole reason for this test. This will show you just how much memory you are using when playing. It was not meant as an example of track laying, but of 'does your system use over 910 Mb of memory to play a map at this point'. Personally, I don't really think you're going to see much of a difference with 3Gb. I know I haven't :cry: .

Posted: Mon Mar 19, 2007 2:35 pm
by Warll
I still may get more RAM enven though you did this test. Why? Because this test was not done on a vista system. I know that when I look at how much memory is being used without Railroads! running it will be somewhere from 600mg-1000mb. I also know that after I play a big SMR game the amount of memory used by vista and other programs goes down to 400mb.

Posted: Mon Mar 19, 2007 8:13 pm
by snoopy55
Warll - this was not to compare my memory usage to yours, it was to look at how much memory your system was using and see if it topped out. If I got these same results and I only had 1Gb, then I would figure I needed more. If you run it and you're using 1900Mb of your memory, then yes, you would need more. If you're only using 900 Mb, then another 1Gb added won't make any difference.

My brothers 1Gb stick I added did not change the results. I still used about the same amount of memory when I reloaded the saved game. Even if you are running on Linux, if you are only using less than half of your memory running this, adding more won't change the results.

My 2.0 Ghz CPU topped out most of the time when the screen stopped. This puts the problem at to much for the CPU I have. Will a faster CPU ar a different type help?, that is an awfull expensive test and it's not for me.

And for further misunderstanding, this was not done and uploaded for me to say 'look what my system did! :D ' This was done to be downloaded and ran for others to say 'Gee, that's how much ram and CPU my system uses running a filled map'.

Posted: Mon Mar 19, 2007 8:55 pm
by Warll
I'm sorry i misunderstood what this test was about. I thought that you were trying to see how much RAM SMR would use at its peak. I did not see or think about the save you uploaded so I thought this was one test to rule them all.

Posted: Mon Mar 19, 2007 9:05 pm
by snoopy55
Warll - no, that's OK. This is why I avoid doing any Wiki write-ups. The one that I did do had to be rewritten. I only hope it helps you decide whether you really need more memory or not. That information from the Windows Task Manager can be run with any map on any computer. Set up the way I did, it will show a Peak usage, so you can even see the results after shutting down the game. And it will help with any game you play. (meaning any other than SMR)

Posted: Tue Mar 20, 2007 3:15 am
by universum
Snoopy55,

I have not misunderstood what you intent was, I was just trying to explain that game slowdowns and frequent "frozen" periods are not related to memory because if they were, whenever you lay new track, you would see your harddrive led diod flashing frantically and you would hear the drive working hard as Windows are pushing receintly non-accessed blocks of virtual memory to the disk and loading required blocks from disk back to RAM.

The performance problems game has are related to complexity. As you get more stuff, more calculations have to be made and game just stops listening to outside world (keyboard and mouse) until it is done with it. It has to calculate terrain changes, entity placements and who knows what else.

Any CPU will have problems with the game as it is. It is probably several orders of magnitude too demanding for current processors can provide. It takes 10-15 seconds on this map to lay new single track. So in order for this whole calculation to take only one second, you would have to have hardware which can do it 10 times faster. This is a LOT.

For the sake of argument, let's say you would tolerate 1 second delay and game takes 10 seconds to sort it all out. You have 2 GHz processor and if it was all related to processor, you would have to have 20 GHz processor. There is no such thing yet and there may never be because of physical limits. The only thing which could come to help in future is paralel processing but the Railroads! were not written to support it.

I have 2.8 MHz processor with Hyperthreading technology (it is almost like having two processors instead of one) but the game does not take advantage of that because processor usage never goes above 50%.

You can probably get 2-4x faster system if you get top of the line motherboard, processor and memory. The delays will be shorter but they won't disappear.

I have loaded your saved game (nice track layout) and peak mem usage was around 703MB. Your number was higher but I think it could be explained by by heap fragmentation. I have loaded late saved game with Arizona Gold and it got to 778MB in the task manager).

Interestingly enough, after deleting all trains, track laying performance improved considerably so some of the calculations must be related to trains.

Posted: Tue Mar 20, 2007 3:49 am
by snoopy55
And YOU, universum, have hit on the head just what this was all about :!: :!: :!: :D

Almost all the talk has been about needing more memory. What you see on that screen shot is 3Gb of memory. It did nothing for the speed of the game. Yes, virtual memory has much to do with it. If you have a 7200 RPM drive handling your VM, it would be slow. If you put a 15000 RPM, it would be faster. I set my VM to 2K and the system continued to use the same amount you see there. I don't understand the VM thing enough to understand why Windows insists on using 574 Mb of VM when it still has 2Gb of memory available to it. I set the VM to 2K per Koroush Ghazi's XPTC instructions and it still used about 570Mb. My brother figured I had done something wrong, so he did it by the instructions. Same results.

One forum member mentions having a 1.8 CPU and 750Mb memory, and it runs smoother than on his loaded machine. And he has a LOADED machine.

I'm looking into building a 2.6 Mhz AM2 dual-core system, but will it be any better? A 10K or 15K HD just for VM may help also, but who knows...

Thanks universum for your input. :D

Posted: Tue Mar 20, 2007 4:43 am
by Warll
snoopy55 wrote: One forum member mentions having a 1.8 CPU and 750Mb memory, and it runs smoother than on his loaded machine. And he has a LOADED machine.
Ssounds like your're talking about me. I had a 1.6 GHz and 750MB and it ran more stable then my new system.
I'm looking into building a 2.6 Mhz AM2 dual-core system, but will it be any better? A 10K or 15K HD just for VM may help also, but who knows...
Again thats me as well :roll: Here I'll load up the save and see how it runs for you.

Posted: Tue Mar 20, 2007 4:46 am
by universum
Glad to be of help.

It is really not issue of Virtual Memory because that is just addressing space of the processor. It could be mapped to either physical memory or to the swap file. You can force it to use only physical memory (your 3GB) by turning it completely off. Go to Control Panel => System => Advanced Tab => Performance => Advanced => Virtual Memory => Change button and set the swap file size to 0.

Railroads! won't take advantage of dual core (other games will http://www.google.com/search?hl=en&lr=& ... tnG=Search ). And I think it will be a little bit better because it has faster clock speed and also your bus and memory speed will most likely also be better than your current system. Obviously no breakthrough change but hopefully noticable.

Posted: Tue Mar 20, 2007 4:55 am
by Warll
Thats odd that you say that. When I run SMR both cores run at the same speed.
PS: I installed the new side to side map and now SMR will not run.

Posted: Tue Mar 20, 2007 7:16 am
by K-class
Have to add it really comes down to the coding in this game.

My results are the same as others as when the game gets complex laying track it slows down to a crawl towards the end of the game. universum sums all this up.

More memory / ram - new CPU well I think don't wast your money just for this game. SMR I believe will make little differance.

Is SMR capable of using multiple CPUs, multi-core CPUs or Hyper Threading. NO

I believe not and this is why you are pushing up hill spending on hardware for this game. (dont get me wrong having a new system core duo etc more ram is nice but dont upgrade for just SMR)

What can you do?

Well make the maps interesting, challenging, lots of variety in goods, engines, location but keep the unnecessary track laying complexity to a minimum, like don't have a goods say for city that involves laying track through or round several mountains and from one side of the map to the other or having to ship 200 plus goods through several cities to get to one city that involves 4 tracks wide and say 10 trains going hard out and repeating this same scenario for several cities in one large map.

I think Basin & Range Demo by Big Papa and Choobacca ties in several of the things I mention above is the right direction in map making tying in several advanced features like new double headed trains and goods and doing different things with these goods.
When dealing with a problem, there exists a frequent tendency toward complication that can lead toward solutions that are far more burdensome than the problem
KISS principle http://en.wikipedia.org/wiki/KISS_principle
:D :D

Posted: Tue Mar 20, 2007 3:08 pm
by Warll
Ok I got SMR working again and I did the test. The result was that It tooks 4 seconds to lay small and large peaces of track.
PS: Both CPUs spiked and mirrored each other during normal play.