Archived

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

Rocky

Using multithreading

Recommended Posts

I finally managed to get it to work... My gauges now use several threads so that FS does not have to wait until the gauge is drawn to continue its own process. It is a significant performance increase, around 50% on the best case with my Airbus gauges, which are quite complex. It is pleasant to see with the task manager that when fs9 is running with my Airbus, both cores are used (I have a Core2Duo, but it would be even better with a QuadCore).But the question I have is the following:When I set the affinity of fs9 to CPU 0 only, I can see in the task manager that only one core is used, but the frame rate is almost the same (from 43 FPS it decreases to 41).Why is that?How come the frame rate is not divided by almost 2?Does it mean that multithreading does not take advantage of both cores? In fact, it does, I can see it on the task manager when affinity is set to CPU0 and CPU1.If anyone has an explanation, I would be glad to know.Thanks,Eric

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Threading is of limited value in the long run because FS is so poorly designed.Add to the fact that utilizing threads on a system that is not hyperthreading or multicore or both and you get a brick wall of performance... to be honest, it's not as easy as you're believing it is.I have lots and lots of info regarding threading in FS, but I won't be discussing it in these forums due to proprietary concerns.

Share this post


Link to post
Share on other sites

I wouldn't say FS is poorly designed, I would say it has been designed at a time when multi-core CPUs did not exist, ot they did exist for professional use only. Indeed, FS is designed to be used without multithreading, but it is our role, as add-on developers, to take all the possible options to push FS over its initial design.And whatever you say, multi-threading is a HIGH value because I consider a +50% increase of performance as a high value. I'm surprised you don't agree with this. I can even say that I have tested my multi-threaded gauge on an old laptop that is not a Dual Core. Even in this situation, the performance is increased. Not that much, but it is increased (from 22 to 25 FPS approx).Even if you think threading is of limited value in the long run, I think treading has a HIGH value in the short term :( Eric

Share this post


Link to post
Share on other sites

Let's just say that I have a great deal more experience regarding threads, FS9 and gauges than you might think.I'd be willing to discuss this in private, but not for public disemination.

Share this post


Link to post
Share on other sites
Let's just say that I have a great deal more experience regarding threads, FS9 and gauges than you might think.I'd be willing to discuss this in private, but not for public disemination.
Ed,I sent you a private message, did you get it?Eric

Share this post


Link to post
Share on other sites

Yes I did... was watching the Superbowl last night, so accomplish much else. I'll contact you shortly.

Share this post


Link to post
Share on other sites