Solved

set processor affinity for an application in registry

Posted on 2012-03-28
2
2,084 Views
Last Modified: 2012-03-30
Is there a way to permanently set the processor affinity for a specific application in the registry?  Preferably without a 3rd party utility?
0
Comment
Question by:icecom4
2 Comments
 
LVL 20

Expert Comment

by:n2fc
ID: 37779178
Task Assignment Manager...
Free download:
   http://www.tomshardware.com/reviews/bang-dual-processing-buck,815-3.html

Using Windows Task Manager is not an option, since it rewuires manual intervention at each execution.
0
 
LVL 7

Accepted Solution

by:
Vanguard_LH earned 500 total points
ID: 37781144
Windows XP doesn't provide the user with profiles where they can define CPU affinities for processes that get reused the next time that process is loaded.  The user is stuck having to manually change the affinity in Task Manager.  Hardly a good solution.  So you're stuck with having to use 3rd party software.

Besides the THG utility that n2fc mentioned, there are also process manager's that include CPU affinity profiles for processes.  One, for example is Process Lasso.  Even its freeware version includes CPU affinity profiles except it is nagware (after the trial period is over, you occasionally get nags).  This program has been handy enough that I bought it so I don't know how often the nags appear.  As I recall, you see a nag each time you reboot your computer, load Windows, and login.  If you leave your computer powered up 24x7 then you won't see the nag until whenever you next reboot your host.  

Process Lasso
www.bitsum.com

Bill2's Process Manager is another process manager that includes CPU affinity profiles.  Some folks don't like utilities that use .Net but then they don't realize it's just another programming environment of libraries just like MFC (Microsoft Foundation Classes) used by the older programs they do like (because they don't realize the coding environ required by their favorite software).  This one is freeware (no payware version) and why some folks prefer it over Process Lasso.  Alas, there is no English version web site so you'll have to know French or use something like Google Translate to read the site converted to English (or whatever is your native language).  

Bill2's site even includes a comparison table between its process manager and several others, so you can get an idea of what others you can try.  Process Tamer is one that I see mentioned employed by some users.

If you go to http://www.softpedia.com/progViewOpinions/Bill2-s-Process-Manager-94017,.html, you'll see my review of a quick trial of Bill2's Process Manager.

Using a process manager that includes CPU affinity profiles or a standalone CPU affinity utility makes sure that the process, no matter how it is loaded, will run with the CPU assignment that you prefer.  You may not directly load a program but instead it loads as a child process, like clicking on a URL link in an e-mail in your e-mail client will load your web browser.  If, however, you aren't interested in making sure a program is assigned to a CPU every time it is loaded and only care when YOU load it by using a shortcut or .bat file then look at SysInternals' psexec.  This lets you at the command line specify the CPU affinity for the program that psexec is told to load.  Use the -a parameter to psexec to specify on which CPUs the specified program will run.

SysInternals psexec (just this utility):
http://technet.microsoft.com/en-us/sysinternals/bb897553

SysInternals pstools (suite of command-line utilities, including psexec):
http://technet.microsoft.com/en-us/sysinternals/bb896649
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
countClumps  challenge 10 107
Specific format 21 181
object oriented javascript web form 8 104
How To Loop - Python 19 79
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now