Jump to content

flyinion

FSX:SE does it not work on Ryzen 3xxx cpu's?

Recommended Posts

Just reinstalled the base game + PMDG 737 + FSUIPC paid version.  Just trying to load a basic flight, in DX10 mode (don't have Fixer reinstalled yet) it completely locks my system.  In DX9  I went to load a flight and the screen (dual monitor setup) just went black and that was it and Task Manager said it wasn't responding.  Not sure what to make of this other than my FSX days might finally be over 😞 

Share this post


Link to post
Share on other sites

Ok well the DX9 thing seems to be just a general issue, the Steam forums all say DX10 to fix it, so I guess I definitely need to get my Fixer install issue fixed.  Also I did a complete uninstall/delete/reinstall of FSX, deleting the appdata folders as well.  No issues so far in DX10, however I also didn't try reinstalling FSUIPC which I noticed hasn't been updated in a few years so I'm hoping it's not a recent Win10 updates issue causing problems with it.  The only other new things I did were to turn off the steam overlay and to turn off GSync.  Not sure which if any of those had an effect.  Next experiment is to try exiting the game in full screen.  That was locking it every time. (using the menu)

Share this post


Link to post
Share on other sites

What graphics card are you useing ?

FYI my win10 FSX combo is running fine, all up to date. ( running intel though)

Running latest version of FSUIPC also.

Share this post


Link to post
Share on other sites
7 hours ago, MaDDogz said:

What graphics card are you useing ?

FYI my win10 FSX combo is running fine, all up to date. ( running intel though)

Running latest version of FSUIPC also.

GTX 1070.  So far it seemed to be behaving last night, but I haven't had a chance to really test it since the uninstall/reinstall.  Kinda trying to wait on getting a working Fixer installer since I definitely have to be in DX10 which is of course very broken without DX10 fixes.

Share this post


Link to post
Share on other sites
Posted (edited)

Wow, well now it's not behaving so well.  Not sure if it was doing it before, but now that I have all my Orbx stuff installed, it keeps randomly spiking ALL 16 threads with a ton of activity.  That seems very unusual for a sim that was not very multi-threaded.  Not sure if it's an issue with the new Ryzen stuff, or something with FSX:SE I never noticed on my old 4790K.  I never did any affinity mask/etc on my old system as it didn't seem to need it.  I think at this point it just may be time to switch to a new sim.

Edited by flyinion

Share this post


Link to post
Share on other sites

mate...who cares whats going on with the threads?...whats it flying like?...is it smooth?

Not many, atm, are running sims with AMD....it is known sims like intel equipment.

that is probably why you don't have many responses to your topic.

switchin' sims because your threads are being used makes no sense. 

 

My cpu maxes core 1, with other threads also showing activity. there all doing something. non are idle.

Bare in mind your running orbx scenery, yes i'd expect heavy  use from the cpu.

How do you know what your seeing isn't perfectly normal? ( as in AMD behavior)

You could run P3D and have the exact same behavior.

Share this post


Link to post
Share on other sites
Posted (edited)
11 hours ago, MaDDogz said:

mate...who cares whats going on with the threads?...whats it flying like?...is it smooth?

Not many, atm, are running sims with AMD....it is known sims like intel equipment.

that is probably why you don't have many responses to your topic.

switchin' sims because your threads are being used makes no sense. 

 

My cpu maxes core 1, with other threads also showing activity. there all doing something. non are idle.

Bare in mind your running orbx scenery, yes i'd expect heavy  use from the cpu.

How do you know what your seeing isn't perfectly normal? ( as in AMD behavior)

You could run P3D and have the exact same behavior.

Well, I need to do more testing with it.  I just don't remember my Intel systems loading all the cores like that, but maybe the Steam edition actually changed more stuff under the hood than I thought.  I haven't simmed super seriously since I switched from the DVD to Steam version a couple Windows reinstalls ago.  I did put XPlane 11 demo on last night and with things pretty cranked it was doing quite well.  Maybe I'll temporarily disable all the OrbX stuff and recheck behavior.  I only checked FPS before/after installing my OrbX stuff. 

Also, if it's going to keep cycling all the threads like that I won't be able to do much until I get my watercooling stuff put into the system in a couple weeks.  Just running the stock cooler that comes with it for now and it was getting quite toasty which results in downclocking on these new gen CPU's just like modern GPU's do.  I remembered today I also need to check GPU usage and see if I'm running into some GPU limit with my 1070 since I'm running 1440p now vs 1080.

Edited by flyinion

Share this post


Link to post
Share on other sites

My install of FSX-Acceleration (the old, boxed version) will use all 4 cores of my old Core-2-Quad Q9650 CPU.  The full use of core 0 is pretty much a constant, the use of core 1, 2, and 3 is somewhat spiky.

Share this post


Link to post
Share on other sites
12 hours ago, stans said:

My install of FSX-Acceleration (the old, boxed version) will use all 4 cores of my old Core-2-Quad Q9650 CPU.  The full use of core 0 is pretty much a constant, the use of core 1, 2, and 3 is somewhat spiky.

Thanks yeah I did some more testing yesterday including vs my old 4790k system. Looked like it was doing similar. Guess I wasn't expecting it since it was so poorly optimized for multi core. Definitely need to get my water cooling up and running though so I can get temps down to allow the CPU to run at higher clocks automatically. I was hitting mid to upper 70's at just a few minutes in to a test flight over Seattle in PNW OrbX region with a default aircraft.  I could shut down my 4790k and steal its Noctua heatsink for a bit but I don't have an AM4 mount for it 

Share this post


Link to post
Share on other sites
Posted (edited)

My experience with FSX running on hypertheaded Intel CPUs is that its default execution behavior will automatically run its threads on the primary cores and leave the remaining "hyper" cores alone.  Looks that that thread execution mechanism fails with the 3000 AMD cpus, which may be a bad thing performance wise, as in smoothness.  If smoothness is lacking, setting the affinity mask in the .cfg file should help.

Edited by TheFamilyMan

Share this post


Link to post
Share on other sites
8 hours ago, TheFamilyMan said:

My experience with FSX running on hypertheaded Intel CPUs is that its default execution behavior will automatically run its threads on the primary cores and leave the remaining "hyper" cores alone.  Looks that that thread execution mechanism fails with the 3000 AMD cpus, which may be a bad thing performance wise, as in smoothness.  If smoothness is lacking, setting the affinity mask in the .cfg file should help.

I'm guessing as the new boards get BIOS updates, driver updates, and Windows gets a couple patches, the early stuff with performance will clear up a bit too.  These things have been out just over a month at this point.  I think I read something the other day that the next round of BIOS code updates from AMD is supposed to bring some performance optimizations as well, but yeah I may need to try an affinity mask.  Need to go find the one for the 8/16 core/thread cpu's.

Share this post


Link to post
Share on other sites

Also yeah I just played with the masks a bit.  Putting it only on cores 1-7 (leaving 0 free) and no HT cores (or whatever AMD calls them) gave a solid performance boost.  Stayed @ or above 25fps leaving KSEA in a PMDG 737-800 which was impossible on my 4790K with the same GPU, at 1080p, and I"m at 1440 now.  Some more tweaking, and cooler temps for higher boost either via auto boosting or direct multi-core OC'ing (might have to manual OC for it since it uses more cores than I was thinking).

Share this post


Link to post
Share on other sites
7 hours ago, MaDDogz said:

Seems your getting somewhere with it !

Good luck!

Thanks, yeah that same test flight with no mask was upper teens and blurry popping textures right off the end of the runway in spot view.  Locking it to 7 cores with a mask gave me 25+.  So now I just need to get those temps down to improve boost behavior and/or manual overclock for better multi-core performance and maybe play with some other masks.  In addition to waiting for another round or two of BIOS/driver optimizations.

Share this post


Link to post
Share on other sites

Oh forgot to mention these comparisons are vs my 4790K at 4.4 all core clock.  The Ryzen was averaging 4.15 to 4.2 last night. Locking down the memory timings on it may help as well (supposed to be a big boost vs cpu clocks), but that's a new area for me so I'm kinda in the learning stage there.  Many review sites were showing 10-15fps+ on demanding titles at 1080p by dialing in the memory timings/subtimings.  

Still no idea about the original problem from this thread of the black screen in DX9 after starting a flight from the startup screen.  Seems that's just a general FSX issue though from what I can see in the Steam forums/etc.  So thankfully Steve got me a working installer for the DX10 fixer.  It's not the latest but matches the latest that was available to me on FSS before they went belly up.

Share this post


Link to post
Share on other sites

The HT core numbering are even cores are primary, i.e. 0, 2, 4, and odd are HT cores.  Setting the affinity mask to all even cores is what you want to do.  Note that what really matters is not to have FSX threads running on any consecutive even/odd pair.

BTW, the above is a somewhat simplified explanation of HT core utilization, but suffices for what is needed.

Share this post


Link to post
Share on other sites
3 hours ago, TheFamilyMan said:

The HT core numbering are even cores are primary, i.e. 0, 2, 4, and odd are HT cores.  Setting the affinity mask to all even cores is what you want to do.  Note that what really matters is not to have FSX threads running on any consecutive even/odd pair.

BTW, the above is a somewhat simplified explanation of HT core utilization, but suffices for what is needed.

Yeah I found a mask calculator and it had a basic and advanced version.  Advanced you check the boxes for which cores and HT threads you wanted so I chose the actual cores for 1-7 leaving core 0 open and leaving all the "HT" cores unchecked.  This is the result..........

[JOBSCHEDULER]
AffinityMask=21844

Share this post


Link to post
Share on other sites

That tool generated AM is spot on correct for your 1-7 physical core execution.  It is surprising that without any AM setting FSX figures out the CPU's HT configuration for intel processors and does the right thing.  FSX directly controls which threads can run on which "logical" cores.  If provided, the AM tells FSX which logical cores it can use for its threads. If not provided, I surmise that FSX uses special intel machine level instructions which query CPU properties (HT has been a intel processor feature since 2003), and the AMD CPU equivalent instructions are different and not implemented in FSX.  I would be really surprised if a bios update could correct this FSX behavior...but I'm ready to be surprised. 

Nice build you got there, hope that it's nothing but joy for you to use. I'm still nursing along a 4770k that I built over 6 years ago.  it's nearly golden overclock abilities still suits my needs, at least "good enough".  Recently did a bios mod so I can boot a x4 PCIe NVMe drive, works great!

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, TheFamilyMan said:

That tool generated AM is spot on correct for your 1-7 physical core execution.  It is surprising that without any AM setting FSX figures out the CPU's HT configuration for intel processors and does the right thing.  FSX directly controls which threads can run on which "logical" cores.  If provided, the AM tells FSX which logical cores it can use for its threads. If not provided, I surmise that FSX uses special intel machine level instructions which query CPU properties (HT has been a intel processor feature since 2003), and the AMD CPU equivalent instructions are different and not implemented in FSX.  I would be really surprised if a bios update could correct this FSX behavior...but I'm ready to be surprised. 

Nice build you got there, hope that it's nothing but joy for you to use. I'm still nursing along a 4770k that I built over 6 years ago.  it's nearly golden overclock abilities still suits my needs, at least "good enough".  Recently did a bios mod so I can boot a x4 PCIe NVMe drive, works great!

I know right after release there were some modern games with affinity mask type issues with the Windows Scheduler especially on the 3900X with the two chiplets that split the cores physically in half.  So that's why I was thinking some driver/Windows updates might help, the BIOS stuff was more about hardware tweaks to the performance of the chips overall (boost behavior etc.).

Edited by flyinion
typo

Share this post


Link to post
Share on other sites

Well, hopefully I can finish my tweaking in a couple weeks.  Just ordered all my watercooling gear, hopefully will be installing next week.  Then I can really start tweaking, trying all core OC's, etc. once my temps are properly under control and not all over the place due to currently using the stock cooler.  I only used it because I knew I was going to do my first watercooling loop and it would have been a waste of $$$ to buy anything to use temporarily.  

Share this post


Link to post
Share on other sites
On 8/15/2019 at 8:44 PM, TheFamilyMan said:

It is surprising that without any AM setting FSX figures out the CPU's HT configuration for intel processors and does the right thing.  FSX directly controls which threads can run on which "logical" cores.  If provided, the AM tells FSX which logical cores it can use for its threads. If not provided, I surmise that FSX uses special intel machine level instructions which query CPU properties (HT has been a intel processor feature since 2003), and the AMD CPU equivalent instructions are different and not implemented in FSX.  I would be really surprised if a bios update could correct this FSX behavior...but I'm ready to be surprised. 

You're surprised because you don't understand how the Windows kernel scheduler works.

The scheduler assigns what CPU core to execute what threads on, each time a CPU slice is available for a given thread to run on. It bases its decision on what core is available, the previous core that thread ran on (for cache affinity) as well as whether the core is a real or virtual (HT) core. The scheduler is the only component that can do this properly, since it has visibility into all the threads in the system and their execution.

The AffinityMask simply tells the kernel "only use these cores when deciding" and is a simple Win32 API call (for P3D) or this Win32 API call (for FSX). It can limit the kernel's choices, but under no circumstances is a Windows application dynamically deciding what thread something should execute on. It gives the kernel a list of choices, nothing more. An AffinityMask of zero simply lets the kernel pick from any available core. Neither FSX nor P3D are interrogating the CPU for what its cores are using CPUID instruction (which by the way is implemented in x64 as well) and there's no point since the operating system provides all of that data with additional information (like whether the core is physical or virtual).

The reason why some folks have issues with new Ryzens is that they have different performance characteristics to Intel especially when switching cores and it takes Windows a little bit of time to catch up. It's much faster now; in the early days I needed to upgrade the entire OS (Win2000 -> XP) so that the kernel would be properly aware of P4's virtual core.

Cheers!

Share this post


Link to post
Share on other sites
Posted (edited)

"You're surprised because you don't understand how the Windows kernel scheduler works."

That's a rather bold and unfortunately misinformed statement.  I've been providing programming support for simulations running in realtime hardware in the loop testing labs for nearly 35 years at a major aerospace company.  As for multi-processor, multi-core, multi-process, multi-thread, realtime, shared memory, and distributed programming, I was a go-to expert (that is, until I recently retired).  To say "you don't understand how the Windows kernel scheduler works" is rather laughable, if not insulting.

Also, your response side stepped my "surprise":  mainly that FSX figures out, WITHOUT the help of a fsx.cfg supplied affinity mask, its host CPU environment and then creates and launches its threads, most likely setting each thread's logical core affinity (as you mentioned) to best alleviate inter-thread contention, all to best optimize FSX's overall execution in light of the CPU resources available to it, whether the host's CPU is hyperthreaded or not. Perhaps my misguided statement about directly querying the CPU set you down your path.  It was a bad guess, as you called out; this system service is the (most probable) correct way that that information is accessed from the OS, as you alluded to: getlogicalprocessorinformation. 

Luke, please indulge me here, you probably know all that follows.  A final note of what a hyperthreaded CPU is, at least from an application programmer's point of view. A hyperthread CPU is a collection of logical cores, period!  (A non-hyperthreaded CPU is also a collection of logical cores!)  Hyperthreading is that two (but could be more) logical cores share the same physical core; but from a program's perspective there are only logical cores available to it, and none of them are specifically marked as a physical core.  The Window scheduler, and informed programs, know its host's CPU(s) logical to physical core ratio, and they best manage their payload to keep all the available physical cores most efficiently busy as possible given the processing payload to be managed. Part of "most efficient" is to minimize the number of each physical core's logical cores in use, but definitely use them when needed!

One bummer about Windows which RTOS provides and Windows does not is the ability to globally have the scheduler reserve cores (and shield them from device and some of the OS interrupts) for exclusive use by realtime applications.  I sort of back door this functionality by using cmd's exe to launch and set an AM for all the FSX helper apps I use, e.g. TrackIR, so FSX is least bothered by them.

Thanks for reading my mini-tome! 🙂

Edited by TheFamilyMan
Dang, I never get it right the first time :-(

Share this post


Link to post
Share on other sites
13 hours ago, TheFamilyMan said:

That's a rather bold and unfortunately misinformed statement.  I've been providing programming support for simulations running in realtime hardware in the loop testing labs for nearly 35 years at a major aerospace company.  As for multi-processor, multi-core, multi-process, multi-thread, realtime, shared memory, and distributed programming, I was a go-to expert (that is, until I recently retired).  To say "you don't understand how the Windows kernel scheduler works" is rather laughable, if not insulting.

I have no doubts that you are an expert in multi-threaded code. I have no doubts that you understand how RTOS-based systems work (an area which I will admit my ignorance with no sense of injured pride) and you've spent a great deal of time designing and implementing systems that are a single, dedicated hardware/software combination.

FS/P3D on Windows is none of these, and the assumptions and design choices you made in your career will not likely be good ones in this environment. If you have spent the last few years writing latency-sensitive multi-threaded code on Windows, I'll happily walk back and apologize. But still disagree with you. 😄

Windows was designed to work in a situation with large numbers of applications from different authors and sources, operated by someone with a limited understanding of the internals of the system. (That includes us, BTW). The apps cannot be individually tuned, it's up to the OS kernel to dedicate CPU time between them given hints (priority, affinity, etc). The kernel has been written by much, much smarter folks than us and 99.9999% of the time just works. The only quirks are when a new CPU comes out with (usually) significantly different latency characteristics - like from AMD.

13 hours ago, TheFamilyMan said:

Also, your response side stepped my "surprise":  mainly that FSX figures out, WITHOUT the help of a fsx.cfg supplied affinity mask, its host CPU environment and then creates and launches its threads, most likely setting each thread's logical core affinity (as you mentioned) to best alleviate inter-thread contention, all to best optimize FSX's overall execution in light of the CPU resources available to it, whether the host's CPU is hyperthreaded or not. Perhaps my misguided statement about directly querying the CPU set you down your path.  It was a bad guess, as you called out; this system service is the (most probable) correct way that that information is accessed from the OS, as you alluded to: getlogicalprocessorinformation. 

With respect, you're continuing with the mistaken assumptions that a) FSX is querying the CPU properties (either directly or via the OS) and then b) setting its thread affinity based on that. Neither is true.

Microsoft has been quite explicit that in the absence of an Affinity Mask, it will request no processor affinity and the OS scheduler will figure it out. By and large, Windows understands the notion of virtual and physical cores, and has done so for almost two decades. It may not be perfectly optimized for AMD chips (iirc which you switch dies there is a penalty which the scheduler doesn't fully realize) but again, there is nothing to be surprised about here. You would find that P3D behaves the same way, and you can query its process affinity mask to see that it it still zero.

13 hours ago, TheFamilyMan said:

One bummer about Windows which RTOS provides and Windows does not is the ability to globally have the scheduler reserve cores (and shield them from device and some of the OS interrupts) for exclusive use by realtime applications.  I sort of back door this functionality by using cmd's exe to launch and set an AM for all the FSX helper apps I use, e.g. TrackIR, so FSX is least bothered by them.

The problem I have with all the AffinityMask voodoo (no offense) is that setting the affinity on program start is a very crude instrument that arbitrarily restricts what the scheduler can do. By and large, we have a ton of spare CPU cycles and as you point out we want to have as many cores available as often as possible - the best way IMO to do that is to let the scheduler pick the best core to execute on from as many choices as possible. The scheduler is not dumb - it understands what cores are busy and will try and schedule away from them if possible. It's also worth noting that the vast majority of add-ons take a miniscule amount of CPU time. In the past, I've looked at aggregate CPU time for processes and my add-ons are a rounding error compared to FSX/P3D. My virtual airline's flight recorder is polling multiple times a second and struggles to exceed 2s of aggregate CPU usage over a 12-hour flight.

(And by and large, if you need higher priority for CPU time, you set the process/thread priority in Windows, not dedicate a core.)

I recall a mantra that I see in every single Linux filesystem tutorial - unless you have a very, very deliberate and informed reason for tweaking any defaults.... leave them alone. By and large it extends to the flightsim world, with the exception that some of the defaults in FSX/P3D arbitrarily restricted the sim for lower-powered hardware.

Thanks for reading my tome!

Cheers!

Luke

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...