What's new
  • Please do not post any links until you have 3 posts as they will automatically be rejected to prevent SPAM. Many words are also blocked due to being used in SPAM Messages. Thanks!

Set Affinity/Priority with WinAFC

somecanadianguy

Well-known member
Joined
Mar 23, 2009
Messages
1,184
Location
somecanadiancity
Anyone having problems setting affinity/priority check out WinAFC:
WinAFC | Get WinAFC at SourceForge.net
(Don't click the 'Download Now' button... click 'View all files' and make sure to get the proper version for your OS)

Download and extract the .zip archive.
Open the file 'affinityinput.txt' and add these lines to the 'Application Profile Lines' section (at the bottom):

Code:
*\FahCore_11.exe := PAIR0+PAIR1+PAIR2+PAIR3 [priority=High]
*\FahCore_14.exe := PAIR0+PAIR1+PAIR2+PAIR3 [priority=High]

This sets affinity of GPU client to all cores and sets priority to high.
You can also set CPU affinity/priority for VMware folding:

Code:
*\vmware-vmx.exe := PAIR0+PAIR1+PAIR2+PAIR3 [priority=Low]

Note:
The above code is for Intel i7 systems with HT on.
Here are the values for other processors...

Code:
Intel & AMD Dual Core: CPU0, CPU1 or PAIR0
Intel QuadCore: CPU0, CPU1, CPU2, CPU3 or PAIR0, PAIR1
AMD QuadCore: CPU0, CPU1, CPU2, CPU3 or QUAD0
Intel Core i7 (HT on): CPU0+CPU1+CPU2+CPU3+CPU4+CPU5+CPU6+CPU7 or PAIR0+PAIR1+PAIR2+PAIR3
Intel Core i7 (HT off): QUAD0

Note 2:
WinAFC needs to be 'Run as Administrator' to work properly.

Important:
Test mode is used to check your syntax and is enabled by default.
When enabled any changes you make will have no effect.
To shut off test mode set to 0, or comment the line with # :
Code:
#
# WinAFC Input File
#
# Lines that start with a '#' and empty lines are ignored. 
# Configuration lines include global flag setting lines, and application profile
# lines. These lines can be interleaved in any order. However, the order in which
# you specify the various application profiles matters if a process could be
# matched by multiple application profiles.
# To run AffinityChanger in TestMode (no affinity settings are modified),
# uncomment the line below and specify a value different than zero. To disable 
# test mode, set the value to 0 or comment the line below.
# It is recommended that you try the input file in test mode first, after you
# make changes, especially if you are unfamiliar with the syntax.
[B]TestMode = 0[/B]




There's lots more info on how to use WinAFC: WinAFC
Hope someone finds this helpful.


(Tested on Vista Home Premium 64bit and Windows 7 Ultimate 64bit.)
 
Last edited:

Dead Things

Well-known member
Joined
Oct 7, 2008
Messages
2,043
Location
Periphery of the Universe
Do you know if WinAFC is good at self-discovering cores that are physical pairs on an Intel quad? If, for example, CPU0 and CPU3 are a physical pair, then would using PAIR0 select CPU0 and CPU1 or the real physical pair? This has always been a manual task for me.

Thanks for the guide - you're awesome!
 

somecanadianguy

Well-known member
Joined
Mar 23, 2009
Messages
1,184
Location
somecanadiancity
Do you know if WinAFC is good at self-discovering cores that are physical pairs on an Intel quad? If, for example, CPU0 and CPU3 are a physical pair, then would using PAIR0 select CPU0 and CPU1 or the real physical pair?

Not sure about that yet.
I just got this set up last night.
Wasn't going to post until I tested it out a little more, but saw some others asking about affinity/priority so figured I'd just post it now.
If I'm missing anything someone please let me know.
So far I'm only using it for the GPU and leave my VMware clients at 'Normal' priority.
 
Last edited:

Perineum

Well-known member
Joined
Mar 9, 2009
Messages
4,050
Location
Surrey, B.C.
Leaving your VMs at normal will eat up your PPD... they need to be at low.

I also tested the difference between "Above" and "high" priorities on the GPU client. I honestly think "above" is better after testing because it interferes less with the machine when running other video intensive applications and the difference in PPD was minimal.

"High" was causing all sorts of pauses in video based applications.
 

Arinoth

Moderator
Staff member
Joined
May 27, 2009
Messages
9,583
Location
Halifax
I get this warning at the end:
WARNING: CWinAFCDLG::TraverseProcessList: there are no valid application profiles. The program will auto-pause
 

somecanadianguy

Well-known member
Joined
Mar 23, 2009
Messages
1,184
Location
somecanadiancity
I get this warning at the end:
WARNING: CWinAFCDLG::TraverseProcessList: there are no valid application profiles. The program will auto-pause

Do you have WinAFC set to run as Admin?
If so, check your code again to be sure it's right (CPU0, PAIR0... all caps).
Oh, and if you have 64bit OS make sure you have WinAFC64.exe
Browse WinAFC Files on SourceForge.net

Here's the bottom of my affinityinput.txt:
Code:
##################################################
##          Application Profile lines
##################################################
#
# An application profile is specified on a single line. 
# An application profile includes the following information: an application
# name, a CPU mask, and optional attributes in the following format:
# C:\Path\To\Application := CPU0+CPU1 [attr1=val1,attr2=val2]
#
# Check the documentation and the provided examples for more 
# information about these fields.
*\FahCore_11.exe := PAIR0+PAIR1+PAIR2+PAIR3 [priority=High]
*\FahCore_14.exe := PAIR0+PAIR1+PAIR2+PAIR3 [priority=High]
 
Last edited:
Top