Jump to content

Affinity Mask: A Necessity?


truenorth71

Recommended Posts

I have been seeing a lot of talk around various flight sim forums about the usage of Affinity Mask. While it is talked about in the SDK for P3D, with suggested insertion, I have to ask whether or not it is necessary. I see a lot of "experts" out there, claiming it is and if you don't use it, you are asking for trouble, but my counter argument to that is that if it really was necessary, then why didn't LM insert some sort of interface into their UI to allow everyone to set it.

 

Seeing as though I am not totally ignorant to backend settings changes in P3D or even FSX, for that matter, this affinity mask setting isn't something that is glaring or out there for everyone to take notice to. If you consider for a moment that someone happens to purchase P3D and install it, they will have a tendency to adjust the settings shown in the settings dialog, and not mess around with the cfg file. Of course, if they have graphical issues in P3D and they go to LM's forums to inquire about the issues, then they may be informed further of the backend settings.

 

I have a system that consists of a intel core i7-4790K, which is currently running (and stable) at 4.49ghz. I currently run P3D v3.2 on my system and for the most part, it runs well. I am sure it could run better, but I wouldn't even know where to start to get it configured in such a way that it would run better. I do get stutters, but then again, I always have, so i got used to it. I'd been of the mind that if I could take off somewhere, fly for a while and land without the program crashing, I would be happy. I have experienced out of memory errors, although they are rare, and they usually spring up at very complex airports, so perhaps that in itself is an explanation that doesn't necessarily reflect the usage of advanced settings changes.

 

I recognize that a bare simulator, such as P3D without any add-ons installed, should run at peak efficiency. Once add-ons are introduced, then problems can arise. My question about affinity mask's necessity is more about whether it will "cure" the stutters, memory issues and any other program crashes, or is it's necessity just another tweak to add to the sim to offset add-ons' demands of more processing power?

- James
Link to comment
Share on other sites

The Affinty Mask is the parameter that tells Windows that this specific application likes to be run in specific processor cores, nothing more. It will not influence memory management or stability. But it can affect performance and stutters.

 

The simplest reason for using an affinity mask is the following:

P3D, as every ESP based sim before it, has a single "master" thread, that will use up all available resources of one single CPU core. So it obviously is not a good idea to run this thread in the same core where Windows likes to start other services and apps too (core 0), and it might help your sim if you move this master thread elsewhere via the affinity mask setting.

To a lesser extent AM makes the sim aware that you have more cores available than it realized, thus making better use for example of a hexacore.

 

A simple and crude test is to use the built-in Windows resource monitor to check which cores are utilized the most when your sim is running and when it is not running. Then decide if you need an affinity mask to even things out.

 

LM could include it in the GUI settings pages, but then again this is a parameter that you only set once on a computer, and it will not be active right away, so why bother? For standard quadcore CPUs it should be unnecessary, except if your core 0 is overloaded with other stuff running alongside the sim.

Link to comment
Share on other sites

I've not bothered with it in P3D, and it runs great, smooth. Unless you encounter problems from the CPU not keeping up, I'd forget it. FSX is another story, but LM has changed the whole ball of wax.

 

Larry N.

As Skylab would say:

Remember: Aviation is NOT an exact Science!

Link to comment
Share on other sites

So in my case, since I have a quad core cpu, I should utilize the resource monitor and see if P3D is running on core 0, or rather, whatever cores it is running on, then set the affinity mask accordingly?

 

OR

 

I should just leave things be?

 

Sorry, this is the confusions I've been plagued with for a while now, as the debates keep piling up over whether it is necessary. I hate to sound like a broken record, and I know this is probably been discussed way too much. I just want to be clear on the subject, that's all.

 

Thanks to you all for providing this information...much clearer that others' explanations.

- James
Link to comment
Share on other sites

Unless you have the feeling that you have a real problem, like frequent stutters or slow-downs, I wouldn't bother with it. Out of interest I would check the ResourceMonitor while the sim is running, just to make sure that it is indeed using all my cores to the extent that it should. If you should notice that only one core is constantly at 100% and that the rest is idling, then setting the AM for the sim would be a good idea.

 

But there is no harm in just trying it out either, the parameter is easily installed in and removed from the cfg file.

 

Unfortunately tweaking a particular sim is not science, it is trial&error. Many of the parameters relate to each other in mysterious ways, there never is a clean-cut solution.

Link to comment
Share on other sites

Is the parameter specified in the SDK still valid with v3.2? Last time I looked at LM's webiste, where they have a guide to the SDK, it looked like the cfg settings changes were just for v3.1. I could be wrong though. Thanks again.
- James
Link to comment
Share on other sites

Is the parameter specified in the SDK still valid with v3.2? Last time I looked at LM's webiste, where they have a guide to the SDK, it looked like the cfg settings changes were just for v3.1. I could be wrong though. Thanks again.

 

Sorry, if and when LM update their SDK documentation is a mystery to me too - currently they seem to upload the content for 3.3, a lot of pages are "not found". And there are a bunch of parameters too, that are either explained badly or not at all. Especially the part about how they depend on each other and what changing them would affect is never explained clearly - probably impossible to do so anyway, there are just too many options to influence the sim.

 

FWIW, I'd say it still works. I recently built a hexacore system, and setting the AM definitely improved core load distribution.

 

BTW, processor core affinty is no specialty exclusive to P3D/FSX. You can assign core affinity for every process running on your computer with the task manager. It is just more convenient with the sim and that neat parameter in the CFG file.

Link to comment
Share on other sites

I have it running smoother with no AM and HT on with i7 4790 despite the 2nd low demand task of p3d being put on second LP of the first core. Masking and giving the main sim thread a whole core for some reason makes it more jittery on my system which is noticeable during panning.
Link to comment
Share on other sites

I have it running smoother with no AM and HT on with i7 4790 despite the 2nd low demand task of p3d being put on second LP of the first core. Masking and giving the main sim thread a whole core for some reason makes it more jittery on my system which is noticeable during panning.

 

It's very simple:

Try it and see

If things are better, keep it

If not, dump it

You can have hours of tedium trying various settings

 

It's entirely dependent on rig, specs, system, addons and other peripherals.

 

I should caution however, that with some addons (aircraft, scenery and texture/vector modifications) ANY modification to AM settings can cause issues so whatever you do `today` may no longer be relevant `tomorrow` after the next scenery, aircraft or software peripheral is added.

The very first thing you do after installing such an addon is revert to the default and tediously work up again from there.

Link to comment
Share on other sites

I have it running smoother with no AM and HT on with i7 4790 despite the 2nd low demand task of p3d being put on second LP of the first core. Masking and giving the main sim thread a whole core for some reason makes it more jittery on my system which is noticeable during panning.

 

And this is one example of how I became confused on the usage of AM. I have read quite a bit, too much in some respects, in the usage of AM. It almost seemed divided between the users and non-users, citing equal examples of why it's needed and why it's not used. Many I noticed, used to use it and don't now because of later versions of P3D. Some continue and claim it still works for them. A small percentage claim it's all about your individual system.

 

I'll cite my own example, which favors not to use it right now. Last night, I performed a flight from EGSS to EGPF, commanding a simple A2A C182 Skylane, as well as including the newly purchased Flight One GTN650 (indispensable add-on, imo) and for the 2 1/2 hours or so, in the air, I actually had wonderful looking weather, courtesy of ASN and REX and my scenery (all ORBX OpenLC EU), never faltered.

 

This is not to say that I won't need it at all because quite frankly, I'm not convinced. I am grateful for the smooth fps I get (capped at 30fps), with no blurred or mismatched textures on the ground. I should also note that I have no external tweaks running, nor any tweaks to my cfg file. Any settings changes are purely within the confines of the P3D settings dialog.

 

I never noticed any strange happenings during the flight and my rig held up just fine. I guess I will continue to monitor, while flying in various places of the world to see if I get the same results or not.

- James
Link to comment
Share on other sites

And this is one example of how I became confused on the usage of AM. I have read quite a bit, too much in some respects, in the usage of AM. It almost seemed divided between the users and non-users, citing equal examples of why it's needed and why it's not used. Many I noticed, used to use it and don't now because of later versions of P3D. Some continue and claim it still works for them. A small percentage claim it's all about your individual system.

 

...and the last sentence is why the first part of the paragraph happens. A PC is a highly complex system of hundreds of processes running all the time and at the same time. To assume that there is "the one" setting of processor core affinity is simply wrong.

 

This sadly is true for all the tweaks. There are just too many of them, and what is worse, they depend on each other. There is no telling in advance if a particular setting will have the same effect on your system than it does on others.

 

I had to use AM, because P3D decided that it wanted to run in only 4(8) of the 6(12) cores. The jury is still out if it is working better now. But most of the time I can attribute disturbances to the using of addons, and not to the simulator setup itself.

 

IMHO - only look for improvement if you feel that you have a problem. Unless you like to fiddle with your sim settings as a hobby, and have steeled your heart to deal with the disappointments :o)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...