Jump to content

  •  


   
Where Flight Simulation Enthusiasts Gather from Around the World!

HOT SPOTS:
 rarrow.gif The 2014 Demographic Survey! - NEW!

rarrow.gif What's new in the Library

rarrow.gif Member Blogs

rarrow.gif Member Reviews - Contribute a Review!
rarrow.gif Bargain Hunters Forum
rarrow.gif Classified, Want, Swap Ads

rarrow.gif AVSIM Team Speak System

rarrow.gif Video Library
rarrow.gif Image Gallery
rarrow.gif Community Links Library
rarrow.gif Tutorials

rarrow.gif FS9. FSX & P3D CTD Guide

rarrow.gif FSX / P3D Configuration Guide

rarrow.gif AVSIM Publications 



Simulation's Premier Resource!

AVSIM is a free service to the flight and simulation communities. Please help us keep it that way. Donate what you can today! Thank you for your support!











. . .
Photo
- - - - -

AffinityMask Tweak


  • Please log in to reply
56 replies to this topic

#1 Cactus1021

Cactus1021

    Member - 8,000+

  • Members
  • 9,107 posts
  • Joined 12 Years, 5 Months and 26 Days Ago.

Posted 23 January 2009 - 08:37 PM

A brief post to distract from the news regarding ACES...Since setting up my new system and installing FSX, I've been testing the various tweaks and found I worked thru most fairly quickly. Having a Quad core system, I assumed having FSX hitting all cores would be a good thing. Yet I'd still see a very slight hesitation in turns. Usually my experiences with hesitations on slower systems was related to I/O and I started thinking as to what good it is, if FSX is hitting all cores, when one or more cores is also tasked by the O/S for I/O. So I experimented with a couple of AffinityMask ( [JOBSCHEDULER] ) settings...AffinityMask=14, which sets up FSX for the last three cores and...AffinityMask=12, which sets up FSX for the last two cores.Testing each AffinityMask entry I also monitored my core temps and confirmed that FSX was hitting the cores I had intended.What I found, and it may indeed be unique to my experience, is AffinityMask=12 offered the best smoothness for me. Why two cores out of the four and not three is beyond me, unless I have another process that is using the first two cores. I didn't see an impact in frames vs. running on four cores vs. two, just a noticeable improvement in smoothness.There's certainly no real science with my experimentation other than casual observation, but I wanted to share something that can be tried for those on quad core systems.My specs--Q82008 GB RamGT 120 w/ 1GB RamVista 64

Help AVSIM continue to serve you!
Please donate today!

#2 Plainplane

Plainplane

    Member

  • Members
  • 355 posts
  • Joined 5 Years, 7 Months and 30 Days Ago.

Posted 23 January 2009 - 08:46 PM

Thanks for the info.I might as well contribute to this by adding that I was told a few weeks ago that AffinityMask=255 is for 8 cores, for i7 users.

#3 Cactus1021

Cactus1021

    Member - 8,000+

  • Topic Starter
  • Members
  • 9,107 posts
  • Joined 12 Years, 5 Months and 26 Days Ago.

Posted 23 January 2009 - 08:59 PM

Thanks for the info.I might as well contribute to this by adding that I was told a few weeks ago that AffinityMask=255 is for 8 cores, for i7 users.

Yes, 255 corresponds to "11111111" in binary, each bit when set to 1 enables affinity for that specific core. In my two examples, 12 equates to "1100" and 14 equates to "1110". Normally "1111" (15) would be the setting for a quad core system, although I believe with SP2 and above FSX will use all available cores unless the AffinityMask is set for something different.Regards,John

#4 Plainplane

Plainplane

    Member

  • Members
  • 355 posts
  • Joined 5 Years, 7 Months and 30 Days Ago.

Posted 23 January 2009 - 09:03 PM

I don't use SP2 simply because of the alpha texture transparency issue with addons. So the AffinityMask thing is very important to me.

#5 Bert Pieke

Bert Pieke

    Member - 5,000+

  • Members
  • 6,700 posts
  • Joined 12 Years, 5 Months and 25 Days Ago.

Posted 24 January 2009 - 02:41 AM

What I found, and it may indeed be unique to my experience, is AffinityMask=12 offered the best smoothness for me. Why two cores out of the four and not three is beyond me, unless I have another process that is using the first two cores. I didn't see an impact in frames vs. running on four cores vs. two, just a noticeable improvement in smoothness.There's certainly no real science with my experimentation other than casual observation, but I wanted to share something that can be tried for those on quad core systems.

Well, I tried it, and to my surprise, I find my system is smoother also with only the last two cores being assigned to FSX.In other words, Affinitymask=12.I'll try flying like this for a while and see how it behaves.Maybe the overhead of scheduling work on four cores ends up fouling up something, and just two makes for smoothersailing.. Just a guess on my part :-)Q6600@3.0, WinXP Pro, 2 GB RAM.
Bert

#6 Highmike

Highmike

    Tail Dragger Driver

  • RTW Race Team
  • 1,113 posts
  • Joined 8 Years, 7 Months and 11 Days Ago.

Posted 24 January 2009 - 04:54 AM

I might as well contribute to this by adding that I was told a few weeks ago that AffinityMask=255 is for 8 cores, for i7 users.

If I could clarify the math used with the Affinity Mask, for:1 core your mask would be 1 which is 00001 in binary2 core your mask would be 3 which is 00011 in binary3 core your mask would be 7 which is 00111 in binary4 core your mask would be 15 which is 01111 in binary8 core your mask would be 31 which is 11111 in binaryI've got a Core i7 and my mask is set to 31! I notice smoother performance without much improvements in frame rates, although frame rates drop significantly under high load situations. I've not tried entries other than powers of two (minus 1), but after reading John's post I think I'll do some experimentation.You'll find a lot of the fsx.cfg tweaks here. The affinity mask one is about half way down the page.Mike.

SignatureBanner9.jpg
 


#7 Inactive Member_Alphahawk3_***

Inactive Member_Alphahawk3_***
  • Guests
  • Joined 44 Years, 8 Months and 1 Day

Posted 25 January 2009 - 06:55 PM

A brief post to distract from the news regarding ACES...Since setting up my new system and installing FSX, I've been testing the various tweaks and found I worked thru most fairly quickly. Having a Quad core system, I assumed having FSX hitting all cores would be a good thing. Yet I'd still see a very slight hesitation in turns. Usually my experiences with hesitations on slower systems was related to I/O and I started thinking as to what good it is, if FSX is hitting all cores, when one or more cores is also tasked by the O/S for I/O. So I experimented with a couple of AffinityMask ( [JOBSCHEDULER] ) settings...AffinityMask=14, which sets up FSX for the last three cores and...AffinityMask=12, which sets up FSX for the last two cores.Testing each AffinityMask entry I also monitored my core temps and confirmed that FSX was hitting the cores I had intended.What I found, and it may indeed be unique to my experience, is AffinityMask=12 offered the best smoothness for me. Why two cores out of the four and not three is beyond me, unless I have another process that is using the first two cores. I didn't see an impact in frames vs. running on four cores vs. two, just a noticeable improvement in smoothness.There's certainly no real science with my experimentation other than casual observation, but I wanted to share something that can be tried for those on quad core systems.My specs--Q82008 GB RamGT 120 w/ 1GB RamVista 64

Very interesting. I tried it with the i7 920. The setting of 12 does force the last 2 cores into full usage on my PC. My task manager shows 50%. The last two cores stay at 100% most of the time.....I never see it drop below 47%. Sometimes the other two cores will kick in and take all cores to 100%. What is strange about this is that without the affinity mask setting my CPU usage can be as low as 24% at times. Using this....as I said I never see it drop below 47%....and yes it does seem to be much smoother...but this will require more testing on my part and is very subjective but still very interesting how it forces the last two cores into constant high usage....and yes I get the same results as you if I use the last 3 cores....the second core..core1...is used at full and the other 3 are picking up the slack but I am not getting much total CPU usage with that setting....very strange. While I agree with you this is certainly not science maybe someone can chime in here and answer as to why this setting forces the last two cores into what for me so far is full usage.

#8 Alvega

Alvega

    Member

  • Members
  • 464 posts
  • Joined 7 Years, 6 Months and 23 Days Ago.

Posted 25 January 2009 - 07:30 PM

This is great. I didn't try it before because Nick_N said SMT (multi-threading) didn't have any effect on FSX and should be disabled in the bios. I just tried all the options and found out that the best is affinitymask=255 (or 254 if you want to have a free core for TrackIR or something else).I noticed a nice improvement, even in the loading of the flight, and now all cores work inside FSX. 7 of them are just used for texture loading, though. Frame rate in flight is slightly better also.Here are some screens:Without SMT, 4 cores working and CPU usage never exceeds 50%Posted ImageWith SMT, during the loading of the flight, 8 cores used and the loading is fasterPosted ImageWith SMT during flight, 8 cores used and CPU usage sometimes reaches 100%.Posted ImageI would say, turn on SMT in the bios and put the affinity mask tweak in fsx.cfg. Get all your cores to work.Cheers
Alvega

#9 Highmike

Highmike

    Tail Dragger Driver

  • RTW Race Team
  • 1,113 posts
  • Joined 8 Years, 7 Months and 11 Days Ago.

Posted 25 January 2009 - 10:16 PM

If I could clarify the math used with the Affinity Mask, for:

I should amend my earlier post with the following correction:1 core = 1 dec or 00000001 bin2 core = 3 dec or 00000011 bin3 core = 7 dec or 00000111 bin4 core = 15 dec or 00001111 bin5 core = 31 dec or 00011111 bin6 core = 63 dec or 00111111 bin7 core =127 dec or 01111111 bin8 core =255 dec or 11111111 binSorry guys, I wasn't thinking straight.

SignatureBanner9.jpg
 


#10 Cactus1021

Cactus1021

    Member - 8,000+

  • Topic Starter
  • Members
  • 9,107 posts
  • Joined 12 Years, 5 Months and 26 Days Ago.

Posted 25 January 2009 - 11:36 PM

I should amend my earlier post with the following correction:1 core = 1 dec or 00000001 bin2 core = 3 dec or 00000011 bin3 core = 7 dec or 00000111 bin4 core = 15 dec or 00001111 bin5 core = 31 dec or 00011111 bin6 core = 63 dec or 00111111 bin7 core =127 dec or 01111111 bin8 core =255 dec or 11111111 binSorry guys, I wasn't thinking straight.Mike.

You can also specify the affinity mask for specific cores depending on which bit is setFor instance, for two cores on a 4 core system, the possible values are:Dec Value / Core # ____3 2 1 003__0 0 1 105__0 1 0 106__0 1 1 009__1 0 0 110__1 0 1 012__1 1 0 0 Back to my original observation, it seems shifting the affinity off of Core 0 and possibly Core 1 seemed to help smoothness although impact on fps seemed negligible. With each of these settings I can watch cpu usage and temps go up for the cores selected and usage/temps down for the ones that aren't.

#11 Inactive Member_simjunkie_***

Inactive Member_simjunkie_***
  • Guests
  • Joined 44 Years, 8 Months and 1 Day

Posted 25 January 2009 - 11:41 PM

I am very interested to hear about this. I'm trying the n=255 setting with HT enabled.Sure looks like it's using all those threads.-jk

#12 Bert Pieke

Bert Pieke

    Member - 5,000+

  • Members
  • 6,700 posts
  • Joined 12 Years, 5 Months and 25 Days Ago.

Posted 26 January 2009 - 01:04 AM

You can also specify the affinity mask for specific cores depending on which bit is setFor instance, for two cores on a 4 core system, the possible values are:Dec Value / Core # ____3 2 1 003__0 0 1 105__0 1 0 106__0 1 1 009__1 0 0 110__1 0 1 012__1 1 0 0 Back to my original observation, it seems shifting the affinity off of Core 0 and possibly Core 1 seemed to help smoothness although impact on fps seemed negligible. With each of these settings I can watch cpu usage and temps go up for the cores selected and usage/temps down for the ones that aren't.

I do not know the internal architecture of the Q6600, so I do not know if it cares what cores are loaded and how the cores might contend for internal resources, but after a bit of trial, I am now flying with the mask set at 6. For me, this gives the smoothest performance.
Bert

#13 Inactive Member_Alphahawk3_***

Inactive Member_Alphahawk3_***
  • Guests
  • Joined 44 Years, 8 Months and 1 Day

Posted 26 January 2009 - 01:42 AM

I do not know the internal architecture of the Q6600, so I do not know if it cares what cores are loaded and how the cores might contend for internal resources, but after a bit of trial, I am now flying with the mask set at 6. For me, this gives the smoothest performance.

Bert, I am going to try the 6 setting. I keep waiting for Nick to chime in here as this is his cup of tea. I also do not understand the architecture but set at 12 does give me smoother performance. Plus when I click on map from in the middle of flight it is opened instantly...not one bit of a delay. The load is faster also. This I can time and prove to myself without trusting my eyes. I never put this setting in as supposedly FSX was using all the cores....and it does but with the setting of 12 on my PC it is using two of the cores to their max....very interesting. Requires much more testing. Regards

#14 jasmckee

jasmckee

    Member

  • Members
  • 6 posts
  • Joined 6 Years and 5 Days Ago.

Posted 26 January 2009 - 02:59 AM

i have just tried this with my amd phenom 9850, chopped this back to two cores instead of the four i was running, and wow, it has slightly improved my frame rates, but the smoothness is outstanding i get no stutters what so ever, and the CS 757 which gave me around 20fps and slight stuttering during turns now gives me on average 25fps and no stutters what so ever, i will be monitoring this on my system and see if i get any decrease in performance.it seems counter productive to remove two cores from running FSX as you would think that you need all the processing power you can get, but it seesm to work in my brief tests, will keep you postedJason

Jason McKee
Avsim Staff Reviewer


#15 Alvega

Alvega

    Member

  • Members
  • 464 posts
  • Joined 7 Years, 6 Months and 23 Days Ago.

Posted 26 January 2009 - 03:15 AM

On my I7 it also seems to be smoother if i leave 1 core free (by setting the mask to 254 instead of 255). I wonder why...
Alvega





   
Where Flight Simulation Enthusiasts Gather from Around the World!