Finding FSX.CFG and setting an affinity mask

The place for hardware and software issues, FS and non-FS related

Moderators: Guru's, The Ministry

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Finding FSX.CFG and setting an affinity mask

Post by rohan »

I'm writing this to try and help Mike to fix or reduce the stuttering he's getting in FSX. I wish I could guarantee that this will fix the problem, but that's not always the case. Anyway ...

One of the frustrating things about FSX, and indeed P3D, is that it creates a profusion of configuration files (FSX.CFG), making it (very) difficult to find the active one. Generally, the active one will be the last one that was updated.

First we need to check whether the existing FSX.CFG has an affinity mask entry (although there isn't one by default), which means we need to check where the latest version is located on the disc. Make sure that FSX is NOT running before you begin.

Click on the "Start" button, then select "All Programs" and click on "Accessories". Right click on the line that says "Command Prompt" and select "Run as administrator". A new window will open into which commands can be typed much like the old days of DOS.

Since Mike's copy of FSX is installed on the C: drive, we only need to look for files on that drive. In this new window, type the following command without the quotation marks "cd \" and press the return key. The flashing cursor should now appear on a line that starts with "C:\" instead of "C:\Windows\system32".

Now type the following command without the quotation marks "dir /s fsx.cfg" and press the return key. It should give you a list of several files, the folders in which they exist and their timestamps. Make a note of the folder (that is, the full path of the folder starting with the drive letter) which contains the file with the latest time and date. (An example would be "C:\data\storage\favourites\- flight simulation\forums").

This folder will probably be "C:\Users\(Mike's user name)\AppData\Roaming\Microsoft\FSX" but we needed to check this. Using Windows Explorer, navigate to the folder noted above from the "dir" list and check that FSX.CFG can be seen there. Right click on the file name and select "Properties", and it should show the same timestamp as the dir command did. Cancel / close the "Properties" window.

Right click on the file name again and select "Edit". The file should open in Notepad showing all its parameters in plain text. Click on the "Edit" menu and select "Find...", then type the word "affinity" (without the quotation marks) in the "Find what:" field and click on "Find Next". Notepad should respond with a "not found" window, which should be cancelled. Browse down to the end of the file and type a new (empty) line and two new lines as follows -

[JOBSCHEDULER]
AffinityMask=14

It would be best to keep the same case of text as I've used here, so perhaps using "copy and paste" would help instead of typing the lines. Close Notepad and click on "Yes" when it asks if you want to save the changes.

That's it. When FSX next runs, it should make optimal use of a four (real) core processor. The only other thing to check is whether hyper-threading is on or off, but I can't guide you through that since it's a BIOS setting - the best I could do is give general pointers. If you look for help on whether to use hyper-threading with FSX on the internet, you'll find opinion split between those for and those against. Personally, I'd vote for OFF but the choice is yours.

Note that if you also run things like TrackIR or ASN with FSX, we'll need to look at using a different value for the mask, but that's a whole other subject so better in another post. Let's see what the results are like first after following the above.

*** Please also note that most of the above won't harm your installation, but I would still recommend two things
1 - if you don't get the same responses as I've noted above, then stop and ask instead of carrying on to the next step.
2 - if you get any boxes / windows popping up, then always click on "cancel" instead of "OK" unless you're ABSOLUTELY sure that you want it to do what it's asking you for confirmation about. I've known too many users who get click happy and have damaged their systems as a result - please take care - it's your system not mine.
***

GHD
Vintage Pair
Vintage Pair
Posts: 2869
Joined: 17 Sep 2004, 14:04
Location: Harton Village, UK

Re: Finding FSX.CFG and setting an affinity mask

Post by GHD »

Hmm, I use AffinityMask=15 on an AMD Phenom II X4 940 running XP for FSX and on an Intel Core i7 930 running W7 for both FSX and P3D.
George

Image

User avatar
Airspeed
Red Arrows
Red Arrows
Posts: 9757
Joined: 14 Sep 2011, 03:46
Location: Central Victorian Highlands, Dja Dja Wurrung Country, Australia
Contact:

Re: Finding FSX.CFG and setting an affinity mask

Post by Airspeed »

Thank you Ro, ;)
That was a step into new territory for me.
The DOS search turned up 3 files;
Program Files(x86)\FSPS\Multicore Environment Advanced 02/11/2011;
Users\User\AppData\Roaming\Microsoft\FSX 29/07/2014;
Xtreme FSX PC 29/04/2014

There was indeed no affinity to be found in any of them, so I pasted your lines into the.....\Roaming\.. etc., being the latest file.

BTW I've often wondered whether I've used too many boosters, and whether they fight one another. :dunno:

Ran the same situation, but had the usual stutters and zooming in and out of the followed aircraft in "Instant replay" :|

Noted that the fps was 70 to 140, and pulled it back to 30. That reduced the stutters a bit, but not completely.
I don't get the effect in normal spot view, only in Instant replay.

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Finding FSX.CFG and setting an affinity mask

Post by rohan »

George,
there's really no point in using 15 since that's forcing FSX to run two threads on one core - you'd actually be better off without an affinity mask on a 4 core CPU whether it's AMD or Intel. As I said in the other topic, FSX is coded as three threads and a thread handler, so forcing it to run parts of those three threads on four cores is leaving yourself open to problems, which will become more probable the longer you run an FSX session. Also, you haven't a lot of headroom left if you run TrackIR or any other FSX app at the same time, but then if 15 is working for you I'd assume that you're not running any FSX add-on apps at the same time.

Of course, you're free to use whatever value you like in the mask - it's your PC after all,
Ro
:worried:

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Finding FSX.CFG and setting an affinity mask

Post by rohan »

Mike,
sorry to hear that things haven't improved.

I noted your comment about boosters, and I'm afraid that I'm not a fan of any of them - especially the payware ones. The thing is that these applets allow you to delve into the inner workings of Windows, and to be honest using them properly is beyond the reach of most users, since it's all too easy to make a counter-productive change through ignorance. If someone has to use one, then it should be a case of slowly, slowly, making just a single change at a time with lots and lots of testing in between changes.

Having said that, there are some freeware applets that I'd recommend if someone really wants to start tinkering in that way. Because they're more limited in what they do, it's easier to keep things under control, but again the slowly advice should always apply. In fact, if you're wanting to use TrackIR or an external weather app with FSX (by that I mean running in parallel with FSX, at the same time), you have to start thinking about using one of these applets and use different values in your affinity mask. Other than that, the vast majority of users are better off just leaving Windows to do its own thing, or looking at using some of the tweaks advocated by Jesus Bojote. As I said elsewhere, there's an awful lot of invalid recommendations posted out there by well-meaning users who don't really understand what they're saying, as well as money-grabbing applet creators just looking for another chance to relieve a poor user of some cash.

Anyway, given the lack of improvement, may I suggest two things - first, is to disable or not run any of those boosters and see if that makes any difference; second is to rerun the dir command to check that the FSX.CFG that you updated is still the latest version of those three. Given that FSX loves to squirrel away all those copies for different reasons in different folders, it would be good to confirm that it's not actually ignoring your update by starting to use a different file. You might also like to check that your update is still in place in whichever is now the latest file.

Another thought has occurred to me, and that's the screen resolution you're using and indeed whether you're running in full screen or windowed mode, but let's stick to one step at a time.

Regs,
Ro
:tunes:

User avatar
DaveB
The Ministry
Posts: 30457
Joined: 17 Jun 2004, 20:46
Location: Pelsall, West Mids, UK
Contact:

Re: Finding FSX.CFG and setting an affinity mask

Post by DaveB »

FSXBooster is cheap as chips and any delving you do is done in plain English.. not just adding lines to the cfg file using notepad :cpu: Is this the one you have Mike?

A 'hover box' over each entry opens and gives a brief summary of what the setting does. It also adds/changes the affinity mask but once more.. it's in plain language. Everything you do in FSXBooster is blissfully easy to un-do but as with all these things, it's wise to make a backup of your original cfg file.. just in case. It really is much easier than trawling the net picking up tweaks here and there that may or may not work.. often leaving you more baffled than before you started.

I'd not go as far as to say its the be all and end all of FSX tweaking but its certainly easier than having to find and open your cfg. I've certainly had more than my £7 worth out of it ;)

ATB
DaveB B)smk
ImageImage
Old sailors never die.. they just smell that way!

GHD
Vintage Pair
Vintage Pair
Posts: 2869
Joined: 17 Sep 2004, 14:04
Location: Harton Village, UK

Re: Finding FSX.CFG and setting an affinity mask

Post by GHD »

FSX runs the simulation on one core and scenery loading on the other three, so Affinity mask of 15 seems very reasonable to me.
George

Image

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Finding FSX.CFG and setting an affinity mask

Post by rohan »

GHD wrote:FSX runs the simulation on one core and scenery loading on the other three...
As I've said, there's a lot of misinformation on the web ...

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Finding FSX.CFG and setting an affinity mask

Post by rohan »

DaveB,
FSXBooster may well tell you what a setting does, but does it explain why that setting is good for your system ? And despite all that automation and making consequential changes to FSX.CFG, you and your system are still at the whim of the coders who created that applet - in other words, what they know or think they know. In this particular case, they sold a lot of copies of an earlier version of that applet, despite many users and several reviews reporting that using it made absolutely no difference to their system ...

Still, if it makes your system run better, or if it makes you think it's running better, then more power to your FSX elbow.

regs,
Ro

User avatar
DaveB
The Ministry
Posts: 30457
Joined: 17 Jun 2004, 20:46
Location: Pelsall, West Mids, UK
Contact:

Re: Finding FSX.CFG and setting an affinity mask

Post by DaveB »

Hi Ro :)

Well.. this is the point I'm making mate. Just how many of us DO know what the hell is going on inside our PC's. I added an affinity mask setting of 14 to my cfg prior to buying FSXB and as far as I could see.. it made absolutely no difference at all. I'm sure it was doing something but it wasn't helping me to see the sim how I wanted to see it.
I appreciate that some reports of FSXB were neutral.. perhaps some even negative but right now.. simply adding an affinity mask didn't do much for me on it's own. I remmed it out prior to adding FSXB :) Do I really know what FSXB is actually doing when I make an adjustment.. hell no but if I don't like what I see, I turn it off again or adjust a slider. I'd know no more of what it was doing should I blindly add or change an entry manually.. probably less. If there was one simple setting.. no, lets make that 3.. easy - medium - hard in FSX.. and we all used the same pc, then nailing performance issues would be a lot easier but the number of permutations is likely to be staggeringly high. I doubt any of us here have exactly the same settings.. we all want to see different things and we all have different hardware. FSXB is as likely (or unlikely) to make an improvement as anything else as far as I can see.

Some folk just wanna 'Wash'n'Go' mate.. others become programmers :lol:

ATB
DaveB B)smk
ImageImage
Old sailors never die.. they just smell that way!

Post Reply