Idle thought time - Performance query

johnwhelan

Well-known member
Chris, Windwalkr, has been saying that running Trainz from an SSD should give better performance and I can't think why. Which has started me thinking about how Trainz probably works. Its old, old code that sort of evolved. I don't think its got SQL lite for the database which means it might even be flat file based. In which case if we could buffer it all in memory then that should give us even better performance than an SSD.

To test this theory we'd need Win 7 64 bit and a machine with say 12 to 16 gigs of memory, the theory would be that Win 7 itself would cache the flat file. I imagine we should be able to tell Win 7 how much memory it can use so two runs one with bags of memory and one with 4 gigs of memory and see if the frame rate differs.

Any suggestions on how we might set up such a test?

Thanks John
 
.. running Trainz from an SSD should give better performance and I can't think why.

A Trainz installation is comprised of tens or hundreds of thousands of small assets, each of which is comprised of many even smaller resource files. The total size of this is anything between 10GB and 500GB. There is no easily defined access pattern- user behaviour from instant to instant controls which files are required at what time and in what order.

This means that streaming performance is very sensitive to disk seek time. Spindle drives are notoriously bad at seek performance compared to SSDs.

chris
 
I have a win 7 64 bit machine with 16 gig of ram on an ssd. It improves performance, but it would still be nice if upon starting driver a question popped up. Trainz can load this entire sessions assets in memory, you you like to play this session in memory?
 
I did ask this not too long ago (unfortunately the thread disappeared in the rollback) but another user told me that it would result in too much memory usage.

Shane
 
I just loaded up a session and Traniz.exe has 1 Gig, and TaDDaemon.exe has about 1/4 gig, I have 87 other PIDs running right now at the total memory being used is 5 Gig of 16. My experience is Trainz will not use any more the 12% of the CPU, an no more memory then it is using right now.
 
One thing to watch out for though is the 2GB limit for 32-bit processes. When I've had Trainz running for a bit, it's been running at ~1.5GB.

Shane
 
Not knowing that I'm doing it took these 2 entries and increased them by 1000 times.

-DynamicVertexBufferSize=4194304000
-DynamicIndexBufferSize=196608000

What do these do in Trainzoptions.txt?
 
Here's that whole file;

-DepthBits=24
-StencilBits=8
-Jet=bin
-cabinfov=60
-DefaultAutoMip=none
-DynamicVertexBufferSize=4194304000
-DynamicIndexBufferSize=196608000
-VBO
-width=1920
-height=1080
-framerate=1000

Oh I have a couple of Nvidia's gtx 560ti in an SLI config, the box gets a 7.6 windows experience index.
 
You may run into problems with that SLI configuration, as Trainz doesn't work properly with it.

Regarding the vertex and index buffer sizes, Trainz normally sets these to optimum settings.

Shane
 
I saw that, it's just not going to use the machine if it's 32 bit. Where's the thread on Tranz 14? Is that a 64 bit program?

I might add, I'm just dinking around till then.
 
Well hope it's 64 bit or its just another brick wall.

Like trying to stuff the proverbial fat lady into a mini skirt and call her Twiggy.
 
Last edited:
Here's that whole file;

-DepthBits=24
-StencilBits=8
-Jet=bin
-cabinfov=60
-DefaultAutoMip=none
-DynamicVertexBufferSize=4194304000
-DynamicIndexBufferSize=196608000
-VBO
-width=1920
-height=1080
-framerate=1000

Oh I have a couple of Nvidia's gtx 560ti in an SLI config, the box gets a 7.6 windows experience index.

2 should be better than 1 but not here. I have a MSI 560 gtx ti and it's rated at 7.8.
 
The problem is 32 bit software it just can not use the machine.

BTW my box is a year old. My processor is the lowest rated at 7.6, an I7 2600K 3.4, everything else comes in at 7.9. However I forgot until Shane pointed it out that this is 32bit Software. It's not that it won't use our boxes, it can't.

You could take what we have, paint them Pink, put a Bow on them, and throw Sugar on Top and say Pretty Please. Trainz can't use it too it's potential.

Like I said; "Like trying to stuff the proverbial fat lady into a mini skirt and call her Twiggy."
 
Last edited:
What I have discovered is Windows 7 64-bit and up (8.x) will allocate 2GB per 32-bit application as though it is setting up memory space for it out of whatever memory you have in your system. This is probably true of all 32-bit applications and the operating system. Since I don't run any other 32-bit applications, I can't be sure. I'm sure a check on the net will reveal the answer to this operation.

Trainz will utilize about 1.5 to 1.7 GB of the 2GB of space. It seems to settle down to that level, never really going higher nor going any lower. This is fine as this is not impacting the system since Windows has already allocated the space for it. The CPU tends to operate quite efficiently with perhaps, as mentioned above, about 12% of the CPU usage being taken up by the program. GPU usage is fairly reasonable and tends to fluctuate a little bit as assets are loaded into view and are drawn. You can see this big chunk happen when you change camera views. Not a big deal, actually. Where the bottleneck seems to be, however, is in disk and network. The program appears to be very I/O bound right now. I for one would like to be able to disable network access while in Driver as I found this really does impact the performance. Why on earth would they want the program to do background network stuff while driving, or within Trainz in general? This extra I/O really does impact the performance very badly.

With all the talk of new stuff coming up, I'm having some wishful thinking. Hopefully the Brew Crew are working on some updates for us that will alleviate some of this bottleneck.

If you want to see this in action, I recommend downloading Process Explorer from Microsoft's TechNet. Follow the link for System Internals. It's one of the many awesome utilities from Mark Russinivich.

John
 
Normal 32 bit programs use 31 bits for addressing under a 32 bit operating system, which addresses 2 gigs of memory. However there is an option to use the full 32 bits if the program has the correct red tape when compiled under a 64 bit operating system which allows the program to address 4 gigs of memory. I think Windwalkr mentioned it was about 3.67 gigs max for Trainz. TS12 has the correct red tape.

Cheerio John
 
Normal 32 bit programs use 31 bits for addressing under a 32 bit operating system, which addresses 2 gigs of memory. However there is an option to use the full 32 bits if the program has the correct red tape when compiled under a 64 bit operating system which allows the program to address 4 gigs of memory. I think Windwalkr mentioned it was about 3.67 gigs max for Trainz. TS12 has the correct red tape.

Cheerio John

And if that is it's strength, it's also it's limitation to those of us that strive for a "more real" environment, only to see our creations not run on a 32 bit platform. The trainz community is creative, to the point that the game no longer can support us.

It needs to come up a notch, to where it's free content contributors are.

ie, instead of just taking a pretty picture of our creation, we need it to run in the Sim too. And to prove that, there is more "chatter" about screenshots loaded with content, (that we all know as a Train Sim drives through it, is like a Mime on super glue), then there is about playing a route around here.

To the point; I can't believe how many people are gone since last year.

But, I can tell you why.

It ain't worth spending time creating something, no matter how pretty it looks, what won't ultimately work, because the platform you are building on is outdated. Take a picture, and move on.
 
Last edited:
if, and only if, that's when you can say something might work about it, but until this we will not know... :o

Just put it on a proper platform, and run it.

I mean look at all the beautiful screenshots. Tell them it's pretty, and awesome....then ask them if you can drive a Train through it without looking like a Mime on super glue. That's why those pictures don't make it to routes you can play with. Because the graphics engine can't handle them in motion. Just take a picture, if they worked as presented, there would be ton's of routes around here. But they don't, so there aren't any.

And I get it creating is fun, but it's a disaster trying to run "your" creation. As it won't run except as a Mime on super glue.

Trainz needs to step up.
 
Last edited:
Back
Top