Performance Increase For All

barryg

Member
Hi all. First off i'd like to thank JCitron for the encouragment needed.... :wave:

I'm not sure which section this should be posted in, so i'll dump it here and let the sparks fly :eek:


What i write here is for your personal reference. I must make clear that i'm not encouraging anyone to break ULEA's with regards to M.S software, but rather correct a general mis-information that has prevented a large user base from realising X32bit windows potential.

Basically in other words - if you choose to use this information your on your own as far as any litigation is concerned.

The following is to help clear-up any mis-understanding that x32bit windows cannot use >3.25GB ram. This text only applies to Windows 7 (all x32bit editions).

Basically, Windows 2003 server is a x32bit O.S that can use upto 64GB of ram. It's M.S that has put the ram restriction into all it's subsequent x32 bit O.S's that prevents you from using >3.25Gb ram. It's purely a marketing decision, and nothing to do with x32bit mathmatical restrictions.

There are 2 apps that are needed to be installed to allow any x32 bit software to use >8GB ram

1. http://www.unawave.de/windows-7-tipps/32-bit-ram-barrier.html

This is a ram patch that will remove the 3.25GB ram restriction. Please read the information as it explains everything in detail as to why, what, and how it works. Please be aware this will void any windows guaranties, and M.S would probably frown on it's usage anyway.

Once installed and your system is rebooted, check the system properties and you'll see that you will have >8GB installed ram available.

The next step is to install CFF Explorer. This allows any 32bit software to access >2GB Address space.


http://www.ntcore.com/exsuite.php


Once CFF explorer is installed -


1. Right click on the Trainz shortcut icon and select open with CFF explorer.

2. Click on the 'line File Header' text on the left, and on the right you'll see text in blue stating 'click here' -

Go ahead and click it.

3. Tick the box that say's: 'app can handle >than 2gb address space' than click 'OK'.

4. Click on the Disk icon at the top of the screen and save (allowing to overwrite).

5. If it refuses to save you need to goto the trainz install folder, and right click/select properties and change the

permissions to allow the user full access. Then try the CFF Explorer app again.


All programs i use are x32bit, and having x64bit O.S installed doesn't really give me a performance boost. Using the above not only lets me use x32bit windoze, but also a full 8GB of ram. I've had zero problems using these apps, and the performance gain of the additional ram really does make a significant difference not only in games, but also the mudane serious stuff.

If your using x64bit O.S there's no point in installing the Ram-Patch, as by default there is no ram restriction. You can still use the CFF Explorer app though.

On boot-up you will be presented with the option to boot into the ram-patched or default windows, so you can choose to use it or not. This is a permenant thing and so far i've had no issues with service packs or patches.


Ever wanted to add this to TrainzOptions: -ResourceMemory=4096

I hope this helps.

Regards Barryg
 
Last edited:
I'm curious to know if anybody has even gotten Trainz to use more than 2.5-3Gb of memory, regardless of OS, let alone more. I haven't, and that's with all sliders (except anti-aliasing) maxed out, various routes including ECML, Avery-Drexel, Mojave, my own routes, etc. and that's either in Driver or Surveyor.
 
~snip~What i write here is for your personal reference. I must make clear that i'm not encouraging anyone to break ULEA's with regards to M.S software,

~snip~
Basically in other words - if you choose to use this information your on your own as far as any litigation is concerned.

~snip~

Barryg

Just thinking.....

What happens if someone does this, their PC goes bad, and they contact MS for help.

MS asks, where did you get this?

Response is.... I got it from the N3V Trainz Forums.

MS says,... oh, they told you how to get around the EULA.

Could this be a problem for N3V?

Just wondering, nothing more.

Have fun,
 
Hi. If Auran/N3V decide this is a no-no then they are more than in their right to delete this post and/or ban me. It's their forum, it's their choice. As i stated this is for personal reference only, what a user decides to do with it is personally upto them.

Regards Barryg
 
Let's take a closer look at what is happening , with a special reference to performance.

First the normal instruction set has room for a 4 gig address on a 32 bit processor. Yes we can access more than this but it needs to be done with extended instructions or by indirect addressing. Indirect addressing works fine but does have a performance overhead, on a server where you really are just doing file accesses the cpu is lightly loaded it can make sense to use it.

The CPU is optimised for certain instructions, Intel do a lot of research as to which instructions are used most frequently and the CPUs are optimised for these. So our more rarely used extended instructions will take longer.

The other thing is that our standard instruction set instruction is a specific number of bits. The address portion will be 32 bits or less. An instruction that has an address out side our 4 gig range must have more than 32 bits, typically 64 bits so that is more information we need to transfer to the CPU in order to execute the instruction. One of the limiting factors on CPU performance is getting stuff in and out. That's why you have caches to help speed up the process. Having to shove more information in to the CPU so it can execute an instruction will slow it down.

The 2 gig limit on a 32 bit processor is very fast to implement. Basically you just make sure the top bit isn't set. When it was done no one dreamed that anyone would even put 2 gigs of memory on a computer.

The 64 bit operating systems are not so efficient as the 32 bit ones, they are a bit more secure and they can allow 32 bit programs a 4 gig memory space. The reason is simple a 64 bit instruction is longer so takes more time to load it into the CPU and to execute.

So if its a small layout running 32 bit windows and 32 bit Trainz will give you the highest frames per second. If its a bit larger then a 64 bit operating system with TS2009/10/12 running in up to 4 gigs allows Trainz to access more memory.

Note the Trainz program is 32 bit instructions so it is impossible for it to access any memory address beyond 4 gigs. Practically speaking 3-3.5 gigs is about the max.

So even if you have 8 gigs of memory Trainz can't use them.

Then we get into security and reliability, and that I think is were there is an issue. I hate to say it but I trust Microsoft more than the downloads listed here.

Cheerio John
 
Hello all,

Nice post Barryg, considered putting this up as well some time ago.

Been using the CFF explorer for quite some time now on many programs including Trainz. I have not had a single issue and yes I agree on my route which is graphically heavy I found a marked improvement after flagging the "2gb address space"

I run Windows 7 Ultimate 64 bit OS with 8gb ram, and nearly every game I play I check with CFF explorer and flag the 2gb address space, and do see an improvement with extra ram usage.

Worthwhile, depends on your preference. Some people dont like tinkering with windows etc, fair enough. But for peeps like me (IT Tech) I get a kick out of seeing how much more I can get out of my system when using some newer games etc that seem to be not flagged to use "2gb address space"

Cheers

Trent
 
Hello all,

Nice post Barryg, considered putting this up as well some time ago.

Been using the CFF explorer for quite some time now on many programs including Trainz. I have not had a single issue and yes I agree on my route which is graphically heavy I found a marked improvement after flagging the "2gb address space"

I run Windows 7 Ultimate 64 bit OS with 8gb ram, and nearly every game I play I check with CFF explorer and flag the 2gb address space, and do see an improvement with extra ram usage.

Worthwhile, depends on your preference. Some people dont like tinkering with windows etc, fair enough. But for peeps like me (IT Tech) I get a kick out of seeing how much more I can get out of my system when using some newer games etc that seem to be not flagged to use "2gb address space"

Cheers

Trent

Interesting, the flag is can make use of more than 2 gig addressing ie up to 4 gig max and TS2009/10/12 already has this set for use under a 64 bit operating system.

Cheerio John
 
Interesting, the flag is can make use of more than 2 gig addressing ie up to 4 gig max and TS2009/10/12 already has this set for use under a 64 bit operating system.

Cheerio John

Odd John, cause I didnt bother with Trainz til just the other week and checked the EXE file for trainz and the 2gb address space was not flagged, I had to manually do it with CFF explorer, And I do get a FPS increase on my stupidly graphic intensive route hehe.

I dont run many games, mostly Battlefield games, Trainz, Starcraft 2, Elderscrolls Skyrim and X3-Terran Conflict. All of these have been adjusted by CFF explorer on my system.

Cheers

Trent
 
Odd John, cause I didnt bother with Trainz til just the other week and checked the EXE file for trainz and the 2gb address space was not flagged, I had to manually do it with CFF explorer, And I do get a FPS increase on my stupidly graphic intensive route hehe.

I dont run many games, mostly Battlefield games, Trainz, Starcraft 2, Elderscrolls Skyrim and X3-Terran Conflict. All of these have been adjusted by CFF explorer on my system.

Cheers

Trent

How fascinating and to think that people have been posting in the forum that TS2010 is using 3 gigs of memory under 64 bit windows 7 without having its flag set. We'll have to speak sternly to it about using resources without the proper license, sorry flag.

There was more detail on the subject in the TS2009 forums which unfortunately are no longer available.

Cheerio John
 
Barry,

Well done here. I'm glad you received my email, which I thought had gone astray because i received an error message when I sent it from the browser version of my email.

I'll give CFF a try and see what happens.

Everyone:!! Make a backup of Launcher.exe prior to doing any tinkering just to be on the safe side.

John
 
Hi guys,

Others have already pointed this out above, but I just wanted to re-iterate it in case there's still confusion:

Nothing that you can do will make a standard 32-bit executable approach or exceed 4GB memory usage, regardless of your OS or hardware.

There are no exceptions, hacks, or workarounds to this rule, and never will be. Anyone who tells you otherwise is poorly informed at best, or actively malicious (ie. trying to get you to install malware on your computer) at worst.

There are some Windows tweaks that will allow you to move from a 2-GB limit to a 3-GB limit, and these do work- but they should be used carefully, because they will cause some hardware drivers to crash or function incorrectly.

There are other advantages to having more RAM. For example, the OS and other executables can use the extra memory that is unavailable to Trainz, rather than fighting Trainz for a share of the same RAM. Also, your OS may be able to use the extra RAM to cache disk operations, improving load/save performance to some extent.

kind regards,

chris
 
Just to see if the CFF un-limit is working:

With Trainz using just over 2.5gb of memory the remaining memory requests resulted in memory allocated to the Paged area. So, since I was getting to 2.5gb in Trainz - does that prove the 2gb limit was exceeded? Not sure how much leeway is in the 2gb limit. Memory showed 94% allocated.

4gb DDR3 installed
 
I'm still putting along with WinXP Media Edition (kind of a "home entertainment" version of XP pro 32 bit) so this doesn't apply to me, but I got curious;

"There are some Windows tweaks that will allow you to move from a 2-GB limit to a 3-GB limit"

I thought 3 gigs was the upper limit for 32 bit? I only have 2 gigs installed so no way to test that, what I'm also wondering is if (like me) you have XP 32 bit with 2 gigs RAM, how do you force Trainz to use more of the available RAM? Even with nothing else running but the task manager I usually see TADDaemon.exe using 150 megs, and trainz.exe using 300 to 500 megs, even with hacks to the trainzoptions.txt for the "keepallresources" and "ResourceMemory=1024" it still stutters and pauses and wants to stay around 350 megs RAM usage even tho there's a lot more available. How do I get it to use more of the available RAM?
 
Wow Windows Media Center, i do remember that as it had the best looking theme, but must admit i thought the hamster driving it would have died by now :hehe:

The CFF Explorer app will only show a working difference if you have more than 2GB installed - usually 4GB.

Regards Barryg
 
Wow Windows Media Center, i do remember that as it had the best looking theme, but must admit i thought the hamster driving it would have died by now :hehe:

The CFF Explorer app will only show a working difference if you have more than 2GB installed - usually 4GB.

Regards Barryg
I have used CFF Explorer on my Trainz 2010. I have Windows XP 64bit and 16GB of ram and it seemed to have some sort of effect. I noticed a slight decrease in lag.:eek:
 
I'm still putting along with WinXP Media Edition (kind of a "home entertainment" version of XP pro 32 bit) so this doesn't apply to me, but I got curious;

"There are some Windows tweaks that will allow you to move from a 2-GB limit to a 3-GB limit"

I thought 3 gigs was the upper limit for 32 bit? I only have 2 gigs installed so no way to test that, what I'm also wondering is if (like me) you have XP 32 bit with 2 gigs RAM, how do you force Trainz to use more of the available RAM? Even with nothing else running but the task manager I usually see TADDaemon.exe using 150 megs, and trainz.exe using 300 to 500 megs, even with hacks to the trainzoptions.txt for the "keepallresources" and "ResourceMemory=1024" it still stutters and pauses and wants to stay around 350 megs RAM usage even tho there's a lot more available. How do I get it to use more of the available RAM?

A 32 bit address can reference 4 gigs, try seeing how many different values you can get with a binary number that is 32 bits long. My background is in assembler and we used different types of instruction depending on how much memory we wanted to address. Basically the smaller the memory address the shorter and quicker the instructions you could use.

Trainz requests memory from the operating system. Internally I think it uses tables and it can request more memory to increase the size of the tables. If you have 2 gigs of memory then in simplified termsbthe operating system will allocate some to itself, and then dish the rest up to other programs.

It's the 32 bit operating system that allows 2 or 3 gigs or even more for some versions of 32 bit operating systems.

2 gigs under windows 32 bit works, above that you can go to 3 gigs and that normally works but may not, the reason being the hardware may be designed to use a memory address in the 2-3 gig range.

Under a 64 bit operating system the 32 bit programs are given a 4 gig window of memory so can reference more than 2 gigs. I think the programs have to have a flag set and because its a 4 gig window it uses a slightly different addressing scheme which isn't quite so efficient to an assembler purist.

Oh real time programs like Trainz like to control the memory themselves so they like to use real memory rather than the swap file.

Cheerio John
 
PEEK POKE PUSH POP JUMP

"must admit i thought the hamster driving it would have died by now"

Yeah, at the time I bought these I had just moved, had an AMD 800 and an AMD 1400, the 1400 case was dented and wouldn't boot after the move. Since I was so busy rewiring the new house and replacing all the windows with thermopanes for the fast approaching winter, instead of building new machines I just ordered two prebuilt Dell XPS 400 machines without paying much attention to the OS. And I still like Win 98SE better. :p

Anyway, seems to be a difference of opinion as to what the max memory XP 32 bit can use (Win98SE had a 512mb limit but you could go beyond that with a .ini file hack) but the question remains, how do you force Trainz to actually use more of the available RAM? That trainzoptions.txt hack -keepallresources and -ResourceMemory=XXXX isn't really explained, how does it work (assuming it works at all) and what kind of numbers should we be using? -ResourceMemory=2048 if you have 2 gigs, or half the installed RAM, or twice the installed RAM, is that actually a switch to specify the minimum it will use before going to the swap file, or the maximum, or is it some kind of cache file size that has nothing to do with actual memory?
 
Hi. As i understand it, the -KeepAllResources line shouldn't really be used if your ram limited and/or using a large detailed route, as it literally keeps all the resources that your route uses in a cache, thus reducing hard drive access and minimising possible stuttering.

Again as i understand it, the -ResourceMemory=XXXX simply sets up a cache for trainz to swap data instead of keep accessing the hard drive for data. The typical usage was/is around half your installed ram.

Of course it all depends on the O.S system used. Looking at my memory monitor, my windoze 7 is using 1.23GB of ram and thats just after booting up and having Seamonkey open to visit this forum :eek: Thus leaving a little over 2.0GB spare. For me, using the Ram Patch and CFF Explorer really does boost my systems performance.

I Hope this helps

Regards Barry
 
Back
Top