Jump to content
Sign in to follow this  
martinlest2

FS2004 & CPU Core Affinity settings

Recommended Posts

<p>I have been reading through the some of the various posts on this subject and have a question which is still unanswered...</p>
<p> </p>
<p>Assuming that FS9 gains nothing from running on more than one core (some say it actually loses), is there anything to be gained from having it run on a core<em> other</em> than Core0 ? As far as I can tell, Windows also tends to run on Core0 and it is very obvious when FS9 starts to load how it is always Core0 that is at or close to 100%, whereas the other cores (I have  an i7-950 + HT, so see eight) hardly stir off zero.</p>
<p> </p>
<p>I am ot sure how I'd set this up though. In the Task manager affinity settings for FS9.exe, all cores are checked by default, but of course because of the way FS9 was designed, in practice the process uses only Core0. At least that's how I understand it. If I unchecked Core0, then I would presumably be getting FS9 to run on Cores1 to 7. Which is not, I gather, at all what should be happening. So if I unchecked all <em>cores</em> and then rechecked, say, just Core2... ??? FS9 would then run on one core, but not Core0, which other processes seem to prefer too.</p>
<p> </p>
<p>Or should I just leave things as they are? To be honest I am more concerned with the life of my CPU, with one core maxed out so much of the time (I only use the PC for FS9 & FSX) than with performance in FS, which is pretty good anyway.</p>
<p> </p>
<p>For anyone not sure what the question here is about, here is a simple video which explains the matter:</p>
<p> </p>
<p>


<p> </p>
<p>(I am not recommending (or otherwise) that anyone follows the instructions there by the way).</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Martin</p>
<p> </p>
<p>LATER: <em>I meant the link to the video to open the page at Youtube, rather than embed the video here. If what's happened is unacceptable, apologies. Maybe a moderator can change it so there's just a link, if there's a problem?</em></p>

===============================================================================================================================================

 

Another coding problem. Here's the text reposted:

 

I have been reading through the some of the various posts on this subject and have a question which is still unanswered...

 

Assuming that FS9 gains nothing from running on more than one core (some say it actually loses), is there anything to be gained from having it run on a core other than Core0 ? As far as I can tell, Windows also tends to run on Core0 and it is very obvious when FS9 starts to load how it is always Core0 that is at or close to 100%, whereas the other cores (I have  an i7-950 + HT, so see eight) hardly stir off zero.

 

I am ot sure how I'd set this up though. In the Task manager affinity settings for FS9.exe, all cores are checked by default, but of course because of the way FS9 was designed, in practice the process uses only Core0. At least that's how I understand it. If I unchecked Core0, then I would presumably be getting FS9 to run on Cores1 to 7. Which is not, I gather, at all what should be happening. So if I unchecked all cores and then rechecked, say, just Core2... ??? FS9 would then run on one core, but not Core0, which other processes seem to prefer too.

 

Or should I just leave things as they are? To be honest I am more concerned with the life of my CPU, with one core maxed out so much of the time (I only use the PC for FS9 & FSX) than with performance in FS, which is pretty good anyway.

 

For anyone not sure what the question here is about, here is a simple video which explains the matter:

 

(as above)....

 

(I am not recommending (or otherwise) that anyone follows the instructions there by the way).

 

Thanks,

 

Martin

 

LATER: I meant the link to the video to open the page at Youtube, rather than embed the video here. If what's happened is unacceptable, apologies. Maybe a moderator can change it so there's just a link, if there's a problem?

Share this post


Link to post
Share on other sites

Many people claim it makes no difference, but using more then one core to run FS9 did make a very slight FPS increase on my system.  On average I saw a 5-9 FPS increase if I used cores 2 and 3 for FS2004.  Keep in mind, when you set your frame rate to unlimited, your frame rate will bounce around, so it may be very hard to see the small increase which is why many people see no difference.  You'll have to prove the FPS increase for yourself setting up a saved flight at a very frame rate hungry airport with everything maxed etc etc etc and repeat the test on core 0 and then spread across two other cores (not using core 0).

The quickest way to set core affinity is to write yourself a small batch program.

 

Windows XP Users
To set affinity in windows XP I use a line that looks like this:

psexec -a 2,3 cmd /C Start "" "C:\Program Files (x86)\Microsoft Games\Flight Simulator 9\fs9.exe" /CFG:NORMAL-fs9

psexec is a utility you have to use to set affinity in Windows XP and can be downloaded here:
psexec -a 2,3   tells XP to run FS2004 on cores 2 and 3.
fs9.exe" /CFG:NORMAL-fs9   Tells FS2004 to use the "NORMAL-fs9.cfg" file.  I have multiple fs9.cfg files for various aircraft.

Window 7 Users
To set affinity in windows 7 you could use a batch program that looks like this:

cmd /C Start "" /affinity xx  "C:\Program Files (x86)\Microsoft Games\Flight Simulator 9\fs9.exe" /CFG:NORMAL-fs9
where xx is =
01 - 1st CPU
02 - 2nd CPU
03 - 1st and 2nd CPU
04 - 3rd CPU
05 - 1st and 3rd CPU
06 - 2nd and 3rd CPU
07 - 1st 2nd and 3rd CPU
08 - 4th CPU
09 - 1nd and 4th CPU
0A - 2rd and 4th CPU
0B - 1st 2nd and 4th CPU
0C - 3rd and 4th CPU
0D - 1st 3rd and 4th CPU
0E - 2nd 3rd and 4th CPU
0F - 1st 2nd 3rd and 4th CPU

Keep in mind the file paths will differ on your system, but you'll get the general idea.
If you want to test this batch program concept out first on notepad.exe you can read this.

Window 7 users could also set affinity using this easy method:

 

Will running FS9 over muliple cores save your CPU? I have no clue.

 

RJ

Share this post


Link to post
Share on other sites

Thanks for the reply. Any comments? Is this a good idea, a bad idea, or pointless (especially in relation to stress on the CPU itself)?

Share this post


Link to post
Share on other sites

Pointless?

 

You own a Beech Baron and run one engine at full power every flight and the second engine at idle. Which engine will fail first?

Your beech baron has two fuel pumps to deliver fuel. Do you fly with one pump off and leave the second pump to handle the entire load?

 

You own a multi core CPU. Do you run everything on one core and leave the others idle?

All cores are contained in one chip, spreading the load across multiple cores will it aid in spreading out heat dissipation? Maybe not too much, but why not spread the hot spots across multiple cores. Heat is a CPU's cancer, why heat up only one core?

Will running a program across multiple cores reduce bottle neck? For FS2004, so slight people say it's pointless.

 

I see no disadvantage running FS2004 on two other cores (which is what I do, just don't use core 0).

Do what makes sense.

 

RJ

Share this post


Link to post
Share on other sites

I would not call it pointless, but I've seen no benefit (this is on a Corei7) giving FS more than 2 physical processors (4 cores). What is more useful is being able to keep it off the 0 physical processor (cores 0-1) just because by default so much other crap will run there. I also shuffle them from one Fs session to the next. What I've found most important with my i7 is to assign entire physical processors to FS, that is cores in pairs starting with even core#s. Making it play more hopscotch than necessary across physical processors has a definite negative impact on rates, smoothness, and stability.
For example (core# affinity settings):
2,3,6,7, or 4,5,10,11 = good
1,3,5,7 or 4,6,8,10 = not as good
 

Share this post


Link to post
Share on other sites

If I run FS2004 on just one processor with my i7-920, I get slight stutters. When I change the affinity for fs9.exe to all processors, then the stutters go away.

Share this post


Link to post
Share on other sites

I tried it with FSX and got worse performance but I don't really know what I'm doing.

 

Obviously ..... if running FSX

Share this post


Link to post
Share on other sites

3Green, thanks, sounds interesting. Since my CPU has 2 cores + Hyperthreading, I'm not sure of the path to take. These are my options:

 

1) Assign Core0 and Core2 (the two physical cores)

2) Assign all but Core 0.

 

I have no option in BIOS for disabling HT; if I had it, it would be all clear for me. What do you all think is better?


Best regards,
Luis Hernández 20px-Flag_of_Colombia.svg.png20px-Flag_of_Argentina.svg.png

Main rig: self built, AMD Ryzen 5 5600X with PBO enabled (but default settings, CO -15 mV, and SMT ON), 2x16 GB DDR4-3200 RAM, Nvidia RTX3060 Ti 8GB, 256 GB M.2 SSD (OS+apps) + 2x1 TB SATA III SSD (sims) + 1 TB 7200 rpm HDD (storage), Viewsonic VX2458-MHD 1920x1080@23-144 Hz (locked at 120 Hz, FreeSync ON), Windows 10 Pro. Runing FSX-SE, MSFS and P3D v5.4.

Mobile rig: ASUS Zenbook UM425QA (AMD Ryzen 7 5800H APU @3.2 GHz and boost disabled, 1 TB M.2 SSD, 16 GB RAM, Windows 11 Pro). Running FS9 there... sometimes on just battery! FSX-SE also installed, just in case. 

VKB Gladiator NXT Premium Left + GNX THQ as primary controllers. Xbox Series X|S wireless controller as standby/travel.

Share this post


Link to post
Share on other sites

Affinity mask has been proven to provide worse fps then without it.

I personally don't use it because it causes me to get bad fps and blurries


a54316-5.png

 

Share this post


Link to post
Share on other sites

Hmmm .. opinion divided, as on so many other threads. Thanks for the ideas. I think though Jim, if you say 'pointless' it'd be good if you said why. The one word answer isn't so convincing :smile: Have you tried out different settings to come to that conclusion? I did say in any case, I was more thinking of CPU life than FS9 performance (which as you see from the screenshot holds around 60fps except at busy airports or in heavy cloud).

I was thinking along the same lines as 'tj22': What is more useful is being able to keep it off the 0 physical processor (cores 0-1) just because by default so much other crap will run there. I'll try a little experiment..

 

First, running FS9 on cores 2-7 (leaving 0-1 for the 'crap'!) and see what happens:according to the performance tab (and my Intel CPU Usage meter), I have around 40% CPU usage on cores 3, 5 & 7 this way. Core 0 is under 10% now. Does this mean that FS9 is running on more than one core? I thought it couldn't..

 

Second, running FS9 on cores 2-3 only, forcing FS9 to run on one CPU, as designed. That way the Task manager performance tab shows core 2 at 100% much of the time.

 

I'll see if there are any performance differences.

 

Martin

Share this post


Link to post
Share on other sites

All,

 

FS04 is a single core program, it runs on one thread only. if you want to adjust which core it uses that is fine,. and you may notice a difference because of what else you are running on core zero. Anything after that is the ol' fish oil effect.

Share this post


Link to post
Share on other sites

Note to 3Green.. I tried your batch file. the first thing is that FS9 now ignores my [Old Modules] entry in the fs9.cfg file and wants to disable a batch of dll files. Also, having used the following line:

cmd /C Start "" /affinity 0E "D:\FS9\fs9.exe" /CFG:NORMAL-fs9

when I look at the affinity settings via Task Manager, FS9 is using cores 2, 3 & 4, not CPUs 2, 3 & 4. In other words, cores 0,1,5,6 & 7 are not being used. How do I arrange it so that cores 2 through to 7 are being used? Also, would need to fix the cfg file issue. I don't understand the last part of the batch file.

Is there another way to get FS9 always to use selected affinity settings? I don't want to have to manually set the values via Task Manager every time I start a flight of course.

Jim, as I say, if you select cores 2-7 when FS9 is running, they all show roughly 40% activity. So FS9 must be using more than one core. Whether that helps or hinders performance is a different question, but it does seem that FS9 can be made to run on multi-cores, no? I don't think I am misinterpreting what I am seeing in Task Manager etc.

Thanks.

Share this post


Link to post
Share on other sites

I tried changing the affinity settings on my recently resurrected FS9 box - an old E8400 OC'd to 3.6, 560Ti, 8GB, Win7 64bit. This is only a dual core, but after disabling either core 0 or 1 saw my frames dip on average about 5 fps. This was while sitting at an FSDT airport (so Couatl engine) along with REX weather engine, AI at 80% and AES running. Simply window FS9 and then you can change the affinity settings dynamically to immediately see any impact.

 

FS9 might be a single thread application, but seems addons that run as background apps can take advantage of being moved to other cores if FS9 is allowed to utilize other cores for their processes - in the same manner that FSX/P3D does.

 

On that, a good idea if you are using Affinity settings to only use physical cores, and not any cores with hyperthreading - this avoids stutters due to thread collisions. Same as in FSX/P3D - so use core 0, 2, 4, 6, 8 for hyperthread enabled CPU's.

 

We all know what works for some, might not work as well for others. Just try changing the settings while running FS9 and see what happens with your fps.


Danny Hicks

Share this post


Link to post
Share on other sites

Try leaving out the last part, so it look like this:

 

cmd /C Start "" /affinity 0E "D:\FS9\fs9.exe"

 

That should be enough.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...