Trainz Multicore, yes or no.

Robert2d6

Cab Driver
It has been my understanding that the Trainz software is not specifically written for Multicore processing, so if you have a multicore machine, the Processor activity is divided between the available cores, but would be equal to what a high speed single core machine could do. Am I wrong in this?
 
I think your question may already be under discussion in this thread.

True, but haven't come across anything factual yet in that thread regarding the issue of " Is Trainz , in fact , written for Multi-Core Processing", which is not the issue under discussion in the thread you quoted. Figured posting here would get a response from someone at Auran, based in fact. Being a retired technical trainer, I don't like assuming or guessing at something.
 
Last edited:
I concur, the other thread is about an apparently faulty dual core system, or something in the ROM BIOS configured wrong. Gonna be a while if there is an official answer to this one, currently about 3AM tomorrow in Sydney.

What I was told is that JET uses one core, but in later versions it shuttles various subroutines off to the second core, in particular AI traffic is processed on a different core from the rest of the game. Tests I've done seem to confirm that;

77664737.jpg


A test session for various mods and reskins, no AI traffic in that session.

75485271.jpg


Same route, different session with AI traffic at 10 minute intervals.
 
... AI traffic is processed on a different core from the rest of the game.

This is not correct. All gameplay functions are currently performed on the main thread. Background threads are used to some extent for content management and the various hardware interfaces (sound, graphics, disk, etc.)

chris
 
That's odd. Anyway it does APPEAR to use both cores when AI traffic is running, but the question on the floor is - Is Trainz , in fact , written for Multi-Core Processing for TS2010 and TS12?
 
The answer to this could be yes... As if you look at the minimum requirements for Trainz 10 is an Intel Pentium D processor at 3.4 GHZ... Pentium D is a dual core processor...
 
TS2009requirements state "3.0GHz or any dual core" for processor, so must be optimised for 2 cores (at least to some extent - maybe as WindWlkr says, farming out sound and some background tasks).

Ken
 
From Trainz 2009 it has supported multiple cores, number was never specified and Chris never actually answered how many when asked, just repeated supports multiple cores. It was actually on the blurb for 2009 or 2010 can't remember which now but one of the features was multiple core support.
 
That's odd. Anyway it does APPEAR to use both cores when AI traffic is running, but the question on the floor is - Is Trainz , in fact , written for Multi-Core Processing for TS2010 and TS12?

I'm not really sure why you asked this question, when you're replying to the post in which I just answered it.

To reiterate:

* All gameplay functions are performed on the main thread. This means that having additional cores available will not benefit these aspects of the game (physics, AI, scripts, user interface, core rendering, etc.)
* Background threads are used to allow numerous systems and functions to be run off the main thread. This means that having additional cores available will prevent these from impacting on the game performance.

What will you see in practice? Having two cores will give definite advantages over having a single core, all else being equal. Having more than two cores may give advantages in specific circumstances (such as during heavy content management tasks, or when using both CM and Trainz at the same time.) Performance is not solely related to the number of cores in your system; switching from one core to two won't double your frame rate.

chris
 
Actually I was looking for the condensed version- Is trainz written for multi core processing, choose one;
Yes
No

I'm interpreting your answer as no, it was written for a single core but (like any other single core game) you will sometimes see benefits from having dual cores.
 
Have a read up on something called threads. Basically programs originally were written to run on a single core however some bright spark introduced multiple processor machines which were followed by multi-core processors. One limitation on speed is heat, multi-core processors let you do more work but dissipate the heat a little.

So you can add complexity to a program by splitting parts of the code out into threads. Then you need an operating system capable of distributing the tasks or threads over the available cores. If you look at task manager whilst Trainz (TS2009 or later) is running or use perfmon then you'll see it does run on more than one core. However in a real time environment its a challenge to ensure that all the information you need at a point in time is available so its much easier to run the main code on one thread and do less important tasks on separate threads. This means the main thread runs on one core which is fairly heavily loaded but other cores maybe more lightly loaded.

Then you get into semantics, different environments define threads slightly differently there are processes, kernel threads, user threads and fibers people write PhDs on combinations and variations of these.

Have you had an explanation in terms that make sense to you? Since Windwalkr is the head N3V programmer and has posted here that multiple threads are used I assume that is enough authority?

Cheerio John
 
Actually I was looking for the condensed version- Is trainz written for multi core processing, choose one;
Yes
No

I'm interpreting your answer as no, it was written for a single core but (like any other single core game) you will sometimes see benefits from having dual cores.

Which is exactly what I was looking for. It is my understanding that if a game is not written for multiple cores, then the advantage for running a multiple core processor is not very much. For instance, there are smart phones today that have quad core processors. Guess what, none of the apps are written for quad core processors, so it is basically just to dazzle the prospective purchaser of the phone into thinking he is getting something, that he is not. My feeling is that if Trainz in fact was programmed to utilize either a 2 core, or 4 core, or any other number of cores, it would be a definite advantage for Auran to state this is their specs for the game. The fact that they don't mention this at all, speaks volumes as far as I'm concerned. I'm betting we never get an "official response" on this thread.

By the way, I am not knocking Trainz because I think it is a great piece of software, but these discussions about the advantage of 4 core and 6 core machines, just don't make any sense to me.
 
Last edited:
Err read this thread? post 10

Plus from the 2009 Blurb here http://www.ts2009.com/wb.php note this was 2009, 2010 and TS12 will probably make more use of threads.

Content Manager:
  • Can operate offline or online
  • Performance and stability greatly improved
  • Search functions improved
  • Last 4 searches saved
  • Batch downloading improved
  • Improved current status/error messages
  • Now performs most operations as background tasks
  • Takes advantage of multi-threading
  • Repair database function added
  • Added custom tool support to CMP
 
Err read this thread? post 10

Plus from the 2009 Blurb here http://www.ts2009.com/wb.php note this was 2009, 2010 and TS12 will probably make more use of threads.


So according to that, the "Content Manager" takes advantage of Multi-threading. I guess if my question was asking about the content manager, that would be an excellent answer. I was asking about Trainz, not one small part of it. This is starting to remind me of the game. "Smoke and mirrors".... LOL
 
Actually I was looking for the condensed version- Is trainz written for multi core processing, choose one;
Yes
No

It's not a realistic thing to simplify in this fashion. If I answer you precisely as you are asking, then the simple answer is "yes", but the picture in your head after I say "yes" will probably not match the reality of the situation. So instead, I'm providing you with the details you need to understand where you will and will not benefit from having multiple cores.

kind regards,

chris
 
Again, feel free to correct me if I'm wrong, the last time I was sure of anything about CPUs was back in the days of the math co-processor - which wasn't really a co-processor at all, it was actually a true DX chip which when plugged in disabled the SX chip and took over the whole system.

Given - TS2010 and later require a Pentium D as a minimum. All Pentium D chips and every generation after that was a minimum of two cores, the last CPU made with a single core was the Pentium IV? If that's true (and again I dunno, my brain is as obsolete as the 80286 SX) then TS2010 and later require at least a dual core, theoretically it won't run at all on a single core CPU at all.

Previous topics allege that TADDaemon and assorted background processes don't run when Trainz is running, this;

28875074.jpg


Appears to contradict that.

Other item, now we hear Trainz does not use the second core for processing AI traffic, contradicting what I was told last year, and the pictures in post #4 seem to confirm the earlier claim and contradict the recent one.

Summary: Beats the hell out of me, but it would appear that if the game wasn't actually programmed to take advantage of dual cores, it certainly doesn't hurt to have them since even when nothing else besides Trainz is running (I even shut down PSP7 between the first and second shot in post #4, nothing running except Trainz and task manager for both shots and I did wait for everything to settle down before taking the readings) it's sending SOMETHING over to the second core. Either that or I don't understand how task manager reports CPU usage.

EDIT: You posted while I was posting all that, thanks - effectively it takes advantage of multi cores, I think that's what we were looking for.
 
Last edited:
From Trainz 2009 it has supported multiple cores, number was never specified and Chris never actually answered how many when asked, just repeated supports multiple cores. It was actually on the blurb for 2009 or 2010 can't remember which now but one of the features was multiple core support.

If the Chris your making reference too is me.. No, I did not... Why? Well it could be for several reasons a specific answer cannot be given... One such reason is Trainz is a large processor user... Single core processors may not be able to handle ALL of the processes Trainz does... But, the more cores you have, the smoother the trainz processes run... Another answer is you would have to talk to the game developer himself to find this out for sure... Now, if I am not mistaken Trainz is a 32-bit game... Most computers today are 64-bit processors... even if your using a dual core processor, if it is 64-bit.. It can read 2 32-bit words at one time, thus allowing for 64-bit processors to read 32 bit items much faster..
 
But...I think we've got something confused here. ;)

Threads are not cores. Multi-threading in CPUs and the OS today allows multiple applications, and components of applications to run somewhat simultaneously by making use of additional highways in the hardware. This allows programs such as Trainz, which make use of this technology to split up functions that would otherwise hog resources. A good example of a multiple threaded process is the ability to receive operation messages within the program to allow the AI to function smoother. In older versions, such as TRS2004, the program would stop when an AI message was sent and received. This "stop" was not perceived by us because it happened very quickly. but sometimes a stuck message, can cause a program to perform poorly or hang because the messaging is a queued up behind some other process that hasn't completed yet. By having other threads available, the program can use another track to keep some parts of the program out of the way to allow others to move quickly.

Multiple cores, however, are a different animal. This would be the same as having two or more CPUs on the same die and substrate. In the old days, a system would need two individual processors to be equal to this, which would mean the system draws more power and the would run less efficiently because the busses are not connected directly. They're connected, but the signals have to travel on the circuit board, and are subjected outside interference from other components and signals on the motherboard. In the days of Windows NT 4.0, the OS was capable of handling dual processors, but they both had to be put in the system when the OS was installed, and they had to have come from the same stepping (revision). If the system administrator decided at a later date to install a second processor, they would have to reinstall the OS all over again.

Now keeping all this in mind, not all applications are developed to make use of these other cores. World Builder, 3ds MAX, many other CAD/CAM applications such as Pro/Engineer, many huge database applications, and many, many other engineering applications, that require the extra processing, are written to make use of the extra cores. They use these to offload many operations to almost parallel process and crunch through the data quickly. We are lucky that our desktop operating systems, such as Windows 7 and Windows 8 can handle up to 256 cores. This was never, even thought of before. These additional cores are not available in the home versions of the OSs. They are for the huge enterprise operations. We have to remember that it's up to the hardware vendors, however, to provide the additional CPUs and cores to handle this many processors. Oracle does this with their huge Sun Servers. Now what is interesting is how a vendor can control the number of cores used by a product, and can license or turn on the use of the other cores in the system. Oracle does this with their database appliance or ODA.

John
 
Back
Top