Using Prio (Windows XP)

This article is kept here as an archive, and for the odd instance where running MSTS on Windows XP still applies.

Good process management can give a performance boot to any game, but MSTS requires a slightly different approach. This tutorial will show you how to use a free process management tool to improve MSTS performance.

Download Prio — Free for private use

First, a little background. Windows normally assigns priority to processes according to its own rather effective rules. If there’s any one drawback to the pre-programmed process management in Windows, though, its that it’s biased toward day-to-day desktop multitasking. In other words, it’s great at juggling your Web browser, a few spreadsheets, some word-processing documents, your email, a print job, your antivirus program and all the other bits and pieces that make Windows work. If all goes well, everything seems quick and responsive. Full-screen games make things a bit tougher because they really aren’t designed to multitask much; they prefer to get as much attention from the CPU as possible. Windows can’t always address this as well within its own normal rules. For modern games, utilities such as Game Booster do a good job of carving out some extra CPU time for a game. Game Booster and others do this by selectively assigning lower priorities to other programs that might be opened by the user, plus some selected Windows services that are “safe” to assign lower priority to. This makes other processes “wait in line” politely behind the game program, while it runs at the normal priority assigned to user applications free of having to share as much time on the CPU. Unfortunately, this isn’t the most effective strategy for MSTS. MSTS isn’t multitasking-friendly to begin with; it wantsto run all by itself and have access to as much of the CPU as it can grab. That works fine under Windows 98, but Windows XP tends to force it to “play nice” according to rules designed for harmonious multitasking. That has the effect of forcing MSTS to wait a little more often no matter what, which is a source of stutters, slowdowns and poor frame rates.

As I’ve mentioned before, it’s important not to have other programs running while MSTS is active. That alone does a lot to reduce contention for the CPU. To take it to the next level, we need to assign MSTS to a higher process priority. The basic way is this:  1. Start MSTS  2. Interrupt MSTS by tapping Control-Shift-Esc  3. Click the “Processes” tab, right-click “train.exe” and select “Process Priority” and then “High” from the popup menu  4. Close the Task Manager and resume MSTS. If you do this, you’ll see an immediate boost in MSTS performance. Frame rates will be more stable, scenery should load more smoothly, and stutters should be fewer except for the inevitable disk accesses for new tiles. Unfortunately, as soon as you quit MSTS, these settings are lost.

Windows won’t let you save process priority changes on its own, but there are 3rd-party tools which add this ability. Most are available for a small cost, but Prio is free for personal use and offers simple management of processes and CPU affinity (more on that in a moment) all within the normal Task Manager interface in Windows. Prio also adds some useful features to the Task Manager, such as details about each process when you hover the mouse over an entry, which can help you troubleshoot PC slowdowns and even find malware. It can also identify “signed” versus “unsigned” processes, which can again help you isolate malware on a PC. Prio adds two extra tabs to the Task Manager. One is “Services” which lists all services installed in Windows and displays their running state — useful for finding resource hogs. The second is “TCP/IP” which displays all network activity and which processes it belongs to. This is handy for finding out if some process or service is chattering on your network connection when it shouldn’t, or even if malware/adware is “phoning home” and causing problems on your PC! Prio is very useful beyond just tweaking MSTS.

For Windows Vista and Windows 7 users, Prio adds something called “Silent Elevation” to process management. It can force a process to run with Administrator privilages when it launches, without triggering any UAC prompts. This is great for handling usability problems when UAC gets in the way of older applications — something MSTS users are quite familiar with!

So, here’s how to set up and use Prio. First, download the tool. The developer’s page for Prio is here as of November 2011. A Google search can also help you turn it up if the site ever moves. Note that my link takes you to the description page; you need to click the “Downloads” button on the page and scroll to find Prio. Prio comes in two versions — 32-bit and 64-bit versions. You need to install the version that matches your operating system.

Prio’s installer is simple and straightforward. Just accept all the default settings and let the installer finish. You may need to restart your PC afterward because Prio is a tiny service which needs to start up with Windows in order to do its job. Take a few moments to read the documentation on the developer’s page so you understand what Prio can do. Note that when you make adjustments with Prio, it only affects what happens when you are logged in to Windows. If other users have their own accounts on the PC, they would have to make similar settings when they’re logged on to get the benefits. Prio’s settings are “profile-specific” in technical terms.

So, once Prio is installed, it’s waiting silently in the background. It won’t make any adjustments until you tell it to. Here’s how to tell it how to improve performance for MSTS:

(Windows Vista and Windows 7 users see note below about “Access Denied” messages and how to stop them.)

  1. First, launch MSTS but don’t bother doing anything with it. (Note — it doesn’t really matter how you launch it, whether it’s by the MSTS shortcut or with Train Store settings. We just need to make the MSTS “train.exe” process show up on the computer.)
  2. Interrupt MSTS and make the Task Manager appear. Pressing “Control-Shift-Esc” will always bring it up instantly. Click the “Processes” tab if it isn’t already selected.
  3. Now, look at the screenshot below. Find “train.exe” and right-click it. Use the popup menus to select “Set Priority” and click “High” as you see here.Use right-click menu to set the MSTS "train.exe" process priority to "High"
  4. If you are using an older, single-processor PC, you’re all done. But if you have a dual-core or better PC, there’s another setting you need to make.  CPU affinity is a setting that can lock a process to a specific CPU or CPU core. MSTS was designed for single-processor PC’s. Windows tries to manage single-processor applications on multiprocessor PC’s for overall system efficiency. Sometimes that means shuffling the process and all or some of its associated threads among CPU cores. Unfortunately, this causes delays which MSTS doesn’t like. It also limits how much of a CPU’s time the process can use. MSTS really wants and needs up to 100% of a single CPU. Using the CPU affinity setting, we can assign MSTS to one CPU core. Windows will automatically move everything else to the other CPU core(s) with no further intervention, because that’s what it’s programmed to do. Just right-click “train.exe” again in the process list, and this time use the popup menu to select “Set Affinity” as shown here.
  5. A new window will appear, showing all available CPU cores. Since MSTS was designed around single-processor PC’s, set the checkmark in only the “CPU 0” box. Make sure all others are blank. This assigns the “train.exe” process to rune only on the first CPU core. Your display should look like the screenshot below; click the “OK” button to save the setting and go back to the main Task Manager window.
  6. Close the Task Manager window and return to MSTS. Exit MSTS as well. Your new settings should now be saved.
  7. Restart MSTS and note how it performs. You may not see earth-shattering performance gains, but you will notice that overall, MSTS just runs a little better. Frame rates will tend to be more stable. Distant scenery objects should appear a bit more smoothly, with less likelihood of making the sim stutter. Lag time between pressing a key and getting the expected control change improves slightly in many cases. The stutter caused by disk access when moving into a new tile and is still present, but is often shorter and quicker. (But not gone — only a solid state drive is fast enough to make this virtually disappear.) For route and activity builders, these tools may also run better, because they operate under the “train.exe” process as well. You will not need to make any other adjustments in the Route Editor and Activity Editor to enjoy the benefits.

Windows Vista and Windows 7 Note:   You may get an “Access Denied” message when you try to adjust settings. While in the Task Manager, you may need to click on the checkbox for “Show Processes from All Users” to cause the UAC prompt to activate. Acknowlege the UAC prompt, and at that point Windows will acknowlege your administrative rights and allow changes.

A couple of notes — Don’t use “Realtime” for a user process. It will simply overrun everything else on the system and compete excessively with Windows system processes, which will make the computer slow down. When assigning a CPU, it seems to work best to assign CPU 0 (1st CPU) to MSTS. This is probably because MSTS isn’t remotely multiprocessor-aware, and will always want to use the first (or only) available CPU. Letting Windows intervene and direct it to a CPU probably only adds complication.

Why does this method of priority assignment work better than sophisticated game enhancers? Probably because game enhancers are designed to work with modern games which take advantage of the enhanced process and CPU management built into Windows. They primarily attempt to leave the game at its default process priority, but will temporarily push other processes down to lower priority levels and let Windows handle arbitration for resources from there. This works well for multi-process, multi-threaded applications. That doesn’t work for MSTS. In an environment with multi-threaded processes, MSTS can get pushed aside unless it’s own priority is elevated in order to trump requests made by other processes and threads. Additionally, Windows will try to prevent a single process from dominating a CPU core. In a multicore CPU, MSTS on its own may never be allowed more than 50% constant allocation to the CPU. It may burst higher, but it will mostly get throttled to what Windows is programmed to think of as “acceptable” and likely to co-exist with other processes. This isn’t how MSTS is meant to run, though. By locking MSTS to one CPU core and elevating its process prioroty, Windows will allow MSTS to be effectively fenced off on one CPU to do what it wants. Windows still has another CPU core to make use of under its “normal” rules, and it will be satisfied with that. Since MSTS is a full-screen application, any performance hits outside of MSTS are irrelevant. Even in the Activity Editor and Route Editor which run in windows, the object is still to dedicate as much computer power as possible to MSTS and this method will help do just that.


November 27, 2011 update: While helping a member of, I was reminded of UAC issues in Windows Vista and Windows 7. Added note on how to get around “Access Denied” messages caused by enhanced the enhanced security configuration.