November 17, 200619 yr Whilst messing about with SimConnect, it occurred to me that programs using SimConnect are separate processes and from a CPU point of view, independent of FSX. Does this not mean that, if coded properly, any add-on that is written using SimConnect could try to set itself up on a processor that FSX isn't using (or at least you could tweak Windows settings to make this happen). I realise that the add-on still has to talk to FSX and that this will slow things down, but there must be some opportunity for add-ons to lessen the load by using alternative processors. I know I'm really talking about plane/gauge systems/ATC here and not scenery but I thought it might be worth mentioning to give some of you a little hope. Given the client-server architecture of SimConnect/FSX and the fact that you can get SimConnect clients to connect to different PCs, this situation isn't a mile off what you would be doing, it's just that the server is on the same box. One other thought that came to mind is that you could actually relieve FSX of having to model weather patterns since that could be done by a SimConnect client on another processor. In fact you could try and find all the bits of FSX that can be switched off but still controlled via SimConnect and allocate a client to each job - maybe we will need a few more cores...Taking perhaps an overly rosy view of things, you could get the possibility (for multi core users) where an add-on might actually speed things up (very optimistic I know). What I'm not sure of is the communication overhead to make this work. Have any of the add-on developers been working on this idea already or are most add-ons to closely intertwined with FSX to make this work?
November 17, 200619 yr Prof. Please! You are a professor, students depend on your knowledge for a brighter future.Imagine a kitchen with the obese Mrs X trying to cook a dish. She can have the ingredients inside the kitchen or just outside through a conduit called API. She has to cook the dish nevertheless and present it you for dinner. We all know by now how fast she is at cooking!The ingreditents dont cook by themselves outside or inside the kitchen.Its another matter, there will come a day when we will reprogram Mrs X to accept semi-cooked food as her ingredient for a final dish. Those semi-cooked ones can be done by smaller cooks outside her kitchen. Today she cant accept semi cooked ones-its just not there in her recipe. Till that day the chopping table can be inside the kitchen or outside but those ingredients wont cook by themselves! Imagine if you get the PMDG recipe home today. That needs far too many vegetables to be cut and Mrs. X will huff and puff that much more!!
November 17, 200619 yr Since they are seperate processes, you can certainly try changing the processor affinity so things run on particular cores. As for the amount of benefit it will give you - honestly I doubt you would get much since I doubt the CPU load of such add-ins is that much anyway, it could even make it worse in some cases due to bus contention and other similar issues (why sometimes setting the affinity of a process to just run on one core can actually speed things up).For a peice of software to truly benefit from dual core, it needs to be written as a true CMP application, but that's a whole other story!The answer really is - try it!
November 17, 200619 yr Ah! Ok Let me expand the analogy a little more for clarity.1. Mrs X today knows to cut bread, put Jam, wrap it up, wear a nice skimpy dress(eye candy) and serves you the food. She takes 20 mins to do this. The bread and jam is inside the kitchen.2. You the FSX junkie need a better recipe so you got the PMDG burger menu where she has to cut the bread, the salad, the onion rings, the mustard sauce then wrap it up and wear a matching skimpy dress and make up(eye candy) and come and present the dinner. That takes her say 40 mins. Now, to fetch the ingredients for the PMDG menu you can keep a servant who'll run to the shop and get the ingredients and handover to Mrs X (Simconnect). That servant is your other core but it wont decrease the 40 mins to your dinner time. 3. Contrast this with a kitchen where there are Mrs. X, Mrs.Y, Mrs Z and Mrs. Bomb. Mrs.X cuts,Y does the burger loading, Z does the wrapping and talks only to bomb who only makes herself up and presents the dinner to you. If each of them take 5 mins to do their job after first 20 mins every 5 mins you'll have a burger in your table!! Ofcourse, the servant then has to become efficient too to get the raw material from shop every 5 mins instead of 40!!
November 18, 200619 yr I know I might be clutching at straws, but what else is there to clutch at? Thought I would try and inject a little optimism into the forum regarding multicore...Surely your servant can prepare some of the burger off site and then hand the rest of it over to Mrs X for assembly? I'm not talking about eye candy here, but there must be some bits than can be shared out. Maybe Mr Y, prepares everything except cooking the burger. I'm not talking about preloading textures or anything like that - I'm just wondering if there are calculation jobs that can be distributed that have a low communication overhead. If this is not the case then what you are saying is that add-ons will never be suited to multi-threading which I find hard to believe. I'm not actually a PMDG user but I would hope the ratio of FSX to PMDG cpu load is not 20 : 40 otherwise I agree, you have a problem.You can do a lot with SimConnect - I've been writing a little program to set or get any of the 800+ variables (about 130 are setable) and I think around 900 events (which you can use to set a lot more values). Sadly the weather API doesn't look too hot but that's hopefully just my misunderstanding. I guess this all really depends on whether you can create a Mrs X,Y,Z and B via SimConnect or if too much has to go on 'in the kitchen'. I admit I don't know, which is why I was asking other folks. I can appreciate that the larger number of polygons etc is not something we can get round but if you had an FMC that was doing a lot of work, that might be possible, then again it might not. By the way, the SimConnect API is quite good fun to mess about with - I spent a couple of hours the other day trying to put my Baron in geostationary orbit but I think all is not being modelled properly at that altitude. The view is however very impressive. Now that I think about it, given the way my Baron didn't exactly maintain orbit and that there are Whale objects available, I wonder if I could recreate a little moment from 'The Hitch Hiker's Guide to the Galaxy' ;).My philosophy with all of this is just to look for places where we might be able to do something rather than wait for a true multi-core FSXI, which I think is some years away (I hope I get to eat my words on that statement). You also have to remember that FSX is light relief for me and I don't take it, or myself, to seriously when I'm in the air or on here.By the way, I like your analogies - very amusing :)
November 18, 200619 yr Cocoloco.There are already few addons that is conducive for such Client Server architecture and they have always worked well even with FS9.1. Active Sky2. Radar Contact3. Project MajentaTo name a few and these would all work very well with FSX. Morever...they are not restricted to run in the dual core mode either..they can all run on different machines for that matter.Manny Manny Beta tester for SIMStarter
November 18, 200619 yr MannyThanks - this was kind of what I was getting at except that now they could all run on the one PC without getting too much of a frame rate hit (provided you had enough cores). I guess what I'm wondering is, how much of FSX could be turned into a rendering and control engine and how much could be 'out sourced' to other processes like Active Sky. I'm guessing that ACES have already been asking themselves this question and it will be interesting to see what the answer is. The reason I ask this type of question is that the CPU speed race is over for a while and we need to start thinking like this to get any further improvements.From what you are saying, it would seem that some Add-Ons will not impose too much of an overhead because they can 'distance' themselves from FSX and be run elsewhere. Other add-ons like PDMG might not but they could reduce the load a bit by creating some components that run externally. Thanks again for the information - I'm only asking these types of questions because I don't know enough about how developers work with FS9 /FSX and just wondering what is possible.
November 18, 200619 yr I love addons that are client server type deal. And yes..they can do plenty of stuff by themselves.I have Project Majenta IFR Panel.. Amazing fluid guages. $100 thats it..it comes with 6 sets of IFR Panels. You can download their demo version and try it for yourself to see how good these guages are. They do all their graphics rendering by themselves.I loved that concept so much.. I am actually building a Flight Illusion guage set. FI has been slow with their product releases due to some manufacturing glitch they ran into. But it looks like they are getting their act together. But like you already mentioned, there are some addons that simply have to be at the mercy of the Flight sim..embedded within. Most of the addon aircrafts and sceneries are in such situation. Wish AI could be outside this... But not sure. Not sure if PMDG aircrafts could "outsource" their heavy duty calculations. Those guys are pretty sharp. I am sure..they would do it in a heartbeat if it could be done.Manny Manny Beta tester for SIMStarter
November 18, 200619 yr One area PMDG definitely can outsource is the FMC. That thing is a FR killer, at least for me. As soon as I hit the 'Activate' button, it immediately costs me quite a few frames.
November 18, 200619 yr No that's not correct. It more like.Mrs. X kills the cow, cleans it, grinds the meat.Mrs. Z picks the tomatos, cleans it, and slices it.Mrs. Bomb peels the onions, and shreds it.Mrs. Y makes the dough, and bakes the bunthat's 90% of the workMrs. X grill the meat.Mrs. Z cocks the onions.that's 7% of the workMrs. Z puts every thing together How much efficiency have I gain?
November 18, 200619 yr Active Sky, Project magenta are the "servants" in my analogy. They do run in different core and for their own job (like downloading weather synthesizing it etc)of fetching vegetables, paying shopekeeper etc but then through simconnect they feed the data to fsx for the cooking bit and Mrs x takes 40 mins to cook. Remember the recipe(active sky, pmdg etc) has more items and Mrs X needs more time to chop them for cooking. Active sky is a very good example. If you monitor your CPUS you will see at times utilization will go as high as 70%(50+20) that when active sky is downloading and synthesizing and then passing on the data via FSUIPC to Mrs X. Does all this make Mrs. X cooking faster. No! Thats where the problem is. Prof. the problem of doing some part of cooking outside is not the issue, the problem is mrx x is programmed to receive data in certain format in this case say raw vegetables, she cannot accept parts, cooked outside and given to her. After all she is just a sofware, not as smart as my real Mrs. X!Hey Prof! what language are you programming C sharp or C++? Designing an add-on need help. Is it ok if I send a private message?
November 18, 200619 yr If it takes Mrs X 40 minutes to cook a burger it's always going to be 40 minutes from griddle to table before you get to eat your burger, no matter how many servants are involved in preparing the dishes. That's the mistake ACES made - they assumed that Mrs X will be replaced by Mrs 2.0X who can cook burgers in just 20 minutes, instead of working on the kitchen principle the rest of the world has adopted in the last couple of years of having Gordon Ramsay doing the baps while Jamie Oliver grills the meat - on a grill that does both sides at once. :)Allcott
November 18, 200619 yr Mrs. X's work can be done in 4 minutes if the meat is chopped up into 10 pieces and let Mrs. 1,2,3,...10 #### them. Mrs. X then put those cocked meat pieces together. LoL.
November 18, 200619 yr I am not a prof.I have 20 years of C/C++/Software Architecting experience (Dos/Windows/Linux). Multithreading is my favorite paradigm of structuring an application. Back in the single processor/core days, I found it sped up software development and I am willing to trade application speed for it. In my business, time to market, timely bring out new features, and satisfy customer requests are the keys to success. Feel free to PM me if you want to chat.
Create an account or sign in to comment