December 29, 201213 yr Commercial Member As most of you know, Bojote introduced the idea of using AffinityMask in the [JOBSCHEDULER] FSX.cfg section to control which core runs the main FSX thread. His conjecture was that we need to offload core 1 (0) from doing the thread scheduling as it was the default core used by other applications. The result was to be better (smoother) loading of textures. On the other hand Nick N. disputes this line of thought with the reasoning that there is no good reason to reduce the number of cores that FSX can use. My own standpoint is a mix of both of their ideas but with a primary goal to reduce core temperatures (non-main cores run 20c cooler). What I just recently learned is that you can use the same AF setting whether you are running 2, 4, 6, 8 or 12 cores. IOW, since the mask is a binary value, it will be applied the same no matter how many cores you are running. Anyone can experiment with this just by using the Windows Calculator app. First of all keep in mind that we are dealing with 1 bit per core and they are usually referenced zero base. IOW core 1 would be referred to as core 0 in zero (binary) based terms. To keep it simple I will use cores 1, 2, 3, 4.... So to make the point I want to set core 3 as the only main FSX thread. Note that additional main threads don't seem to make any difference to FSX and remember that my goal is to keep non-main threads (or cores) running cooler. For now just think of non-main threads as the ones doing the scenery, traffic and whatever type of work. OK, assuming a 4 core setup, in Win Calc set it to bin mode and set the following bits - 0100. Reading from right to left core 1 is 0, core 2 is 0 core 3 is 1 and core 4 is 0. Switch to dec mode and the result is 4. So to get what I want I would set AffinityMask= 4. Also note that Bojote's favorite setting was 12 or a bit setting of 1100 on a 4 core machine giving 2 main threads on cores 3 and 4. Now consider a 4 core processor with Hyperthreading which means 8 virtual cores. Using 11110100 or an AF value of 244 I would get 5 main threads and 3 worker threads but the same result on my 4 core computer. IOW only the first 4 bits will be significant on a 4 core machine so I could use and AF of 244 or 4. Now lets consider a 6 core cpu without Hyperthreading. In this case a setting of 110100 would yield 3 main threads with 3 scenery (work) threads and an AF value of 52 but would still give me the same result as with AF=4 on my 4 core machine. Anyway the whole point in this exercise is to let you know that any AffinityMask value you see out there needs to be evaluated in terms of your own setup. Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
December 29, 201213 yr Not sure I completely follow your logic.. As I understand it, the cores that are selected by the mask are usable by FSX, the others are not. Case in point: 4 core CPU, AF=14 (1110) Core0 will still carry the (minor) unmovable FSX load Core1 will carry the main FSX load Core2 and 3 will be used for scenery loading If you change AF to 12 (1100) Core0 will still carry the (minor) unmovable FSX load Core1 will not be used at all Core2 will carry the main FSX load Core3 will be used for scenery loading If you change AF to 4 (0100) Core0 will still carry the (minor) unmovable FSX load Core1 will not be used at all Core2 will carry the main FSX load, incl. scenery loading Core3 will not be used at all Bert
December 29, 201213 yr Author Commercial Member Thanks Bert - logic is that any AF setting that affects cores greater than what you are running are ignored. Basically you need to consider the bits as they apply to your actual cores and not the overall setting. IOW for your 1100 bit setting a 11111100 (8 virtual core) bit setting would still be applicable and work just as well. Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
December 30, 201213 yr Fine, I am willing to believe that 1111111100 is equivalent to 1100 for a four core CPU.. if that is your point :huh: AF=4 basically reduces your precious multi-core CPU to a single core CPU, so that may keep a bunch of cores cool, but also under-employed.. Bert
December 30, 201213 yr Author Commercial Member Yes I fully agree. Which brings me to another question - why does FSX perform the same with 1 or several main threads? Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
December 30, 201213 yr OK - you do not get more than one main thread (see my examples above). That is why CPU speed is so important for performance. The thing that the other cores are helping with is texture loading, as best I know. Bert
December 30, 201213 yr Moderator This is an automatic message. This topic has been moved from "Flight Simulator Tips and Tricks" to "MS FSX Forum". This move has been done for a number of possible reasons. The most likely reason is that the post was off topic. The topic could also have contained images or a video that were not appropriate to the original forum it was posted in. The images might not have been "illustrative" or "explanatory" in nature. The topic could have been moved because we deemed it to be more appropriately placed elsewhere. Please ensure that your posts are "on topic" and contain illustrative images or videos as appropriate. Do not post videos or images just for entertainment purposes anywhere but in the screen shot or video forums. Members who continue to post off topic posts can be denied entry to specific forums in order to reduce and remove the practice. Your cooperation is appreciated. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
December 30, 201213 yr Commercial Member I tried AF=13 and AF=14 on my quad core, non of these settings improved perfomance in FSX at all. I tried AF settings numerous times, almost every time after I deleted fsx.cfg. No FPS gain, textures are loading at the same speed or even a bit slower. In my case AF is even not a placebo effect. :( Current system: ASUS PRIME Z690-P D4, Intel 12900k, 32GB RAM @ 3600mhz, Zotac RTX 3090 Trinity, M2 SSD, Oculus Quest 2.
December 30, 201213 yr Author Commercial Member So Bert - If FSX can't have more than 1 main thread then why when using AF = 14 are 3 cores running hot? I would like to understand what FSX is doing with the added processing power. Is it possible that FSX is just duplicating work from the main thread on them? Like I said before it seems that there is no added benefit from having more than 1 main thread. I guess I can do some bench tests to see if there is an FPS improvement in an high traffic area. Also, do you think there is an advantage for the OS by only allowing FSX to use one core? Basically without an AF setting FSX will hog all of the CPU resources but what the heck is it doing over just having 1 main core active. Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
December 30, 201213 yr As best I know, texture loading is offloaded to the other cores. If you watch the task manager, you'll see that the main load is pretty much at 100% the entire time, but the texture loading cores turn off and on, at least every minute, to re-light the scene. Here with AF=14 Bert
December 30, 201213 yr Author Commercial Member Thanks Bert - So I did some tests at KSFO, active runway (cockpit and topdown views) and unlimited FPS. AF=15 (all cores) FPS= 48, AF=14 (3 cores) FPS=47, AF=12 (2 cores) FPS=50 and AF=8 (1 core) FPS=51. So I'm back to my original contention - shouldn't I limit to 1 core and keep the others running cooler with the added advantage of giving the OS more processing power? If there is some advantage in high scenery areas then I may just go with Bojote's setting of 12 which seems to be the middle ground. Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
December 30, 201213 yr Hello jja and all, This excellent post by Lars(Avsim user SAAB340) helped clarify affinity mask options for me. Thought I'd post it in case you missed it: http://forum.avsim.n...ing-ssd-vs-hdd/ edited to add check post #22 in that thread as Lars reposted the missing graphs from the OP Simon
December 30, 201213 yr Author Commercial Member Thanks Zap - It was a good read and confirms what we know about FSX and how multiple cores assist in texture loading. My standpoint is that FSX doesn't need all that processing power just to load textures which is more of a function of the OS / Storage infrastructure. That said I am happy to give FSX 2 cores to work with and insure that the OS is not starved and that way achieve some sort of balance between the OS and FSX. It may be time to go back into the archives and revisit what the FSX team (Phil Taylor) had to say about the subject. Cheers jja Jim Allen[email protected]SkyPilot Software home of FSXAssist / P3DAssist
January 1, 201313 yr Commercial Member My standpoint is that FSX doesn't need all that processing power just to load textures which is more of a function of the OS / Storage infrastructure. It's not so simple. Texture loading in FSX is not just "loading", the dumb operation of loading a disk file and sending the texture to the graphic card. Before a terrain texture is sent to the video card, it needs to be *composited* with the data coming from vector data. Vector data in FSX (and in FS9 and FS8 too) is not used as such, for example overlapped as polygons, FS2000 did this, and the result was terrible, both in performances, and in visual quirks, with ugly polygonal roads climbing over the textured terrain and not really visually integrated with it. In FSX Vectors for roads, rivers, coastlines are rasterized into pixels and applied to the original terrain texture that is on disk, and *then* are sent to the video card. The terrain texture on disk, it's really no more than a template, here's some explanation of the process by Microsoft: http://www.microsoft.com/Products/Games/FSInsider/developers/Pages/GlobalTerrain.aspx This means, preparing the textures in such way, can be computationally expensive, so having it on a separate thread will be useful. How much *parallelized* can be, which means how *much* can benefit from running on MANY separate threads, it's a different issue. For example, I use a real 8-core system ( a MacPro with Dual Xeons ), which means I have 8 real cores with 16 in hyperthreading, which is way more than what most people use for FSX, but since the CPU is only 2.66 ghz, even if I can see all 8 real cores being used when loading the scenery, it's not running any better and it's probably slower than a comparable i7 with a faster clock with "only" 4 cores. Umberto Colapicchioni http://www.fsdreamteam.com FSDT on Facebook
January 1, 201313 yr As most of you know, Bojote introduced the idea of using AffinityMask in the [JOBSCHEDULER] FSX.cfg section to control which core runs the main FSX thread. His conjecture was that we need to offload core 1 (0) from doing the thread scheduling as it was the default core used by other applications. Just to give credit where it's due, Bojote gave us tweaks like the UsePools=0 tweak, plus the shader 3 mods, of which I am greatful for. The AffinityMask tweak though is a well documented (At least when Phil Taylor's Blog was posted) tweak from day 1 of FSX's release! Thanks Tom My Youtube Videos! http://www.youtube.com/user/tf51d
Create an account or sign in to comment