Assign certain cpu-affinities to process instances having the same name

Started by marbitt, April 30, 2012, 08:05:57 AM

Previous topic - Next topic

marbitt

In the BOINC project there are science applications that run different instances of the same process. In process lasso, it is possible to assign this process to a group of certain cpus.  It turned out in my optimizations that the efficiency of such a single process-instance is best, if I assign just a single cpu to each single process-instance. Since each process instances will be terminated  every half hour and a new process instance is started with affinity to that whole group of cpus, I have to assign the new started process instance to the one free cpu again ::). This results in a question or a feature request: Is there already an option to assigne the members of a group of instances of the same process to members of a group of cpus unambiguously?

Jeremy Collake

Interesting need. There's always some need I'd not anticipated, which is why I've got a much more robust rule system coming down the pipeline. However, this is one thing I'd not added, so will put it on the list. Thank you for the suggestion!
Software Engineer. Bitsum LLC.

RozzSummer

My apologies for bumping an old thread.

I have a similar situation when running Folding at Home.  I would like to assign specific instances of a process with the same name to specific CPU cores.  It turns out that very fast CPU response from a GPU request dramatically improves overall efficiency, so simply setting the GPU process to "High" isn't adequate; it has a noticeable effect on performance. Any thoughts on when this functionality might become available in PL?

Jeremy Collake

Quote from: RozzSummer on October 18, 2013, 03:37:35 PM
I have a similar situation when running Folding at Home.  I would like to assign specific instances of a process with the same name to specific CPU cores.  It turns out that very fast CPU response from a GPU request dramatically improves overall efficiency, so simply setting the GPU process to "High" isn't adequate; it has a noticeable effect on performance. Any thoughts on when this functionality might become available in PL?

You can already do this, but it takes a little work.

First, you need a way to differentiate the instances. In this case, we'll use paths.

You can either copy the install folder, *or* create a junction point (a type of symbolic link), so that a differently named folder points to the same place on disk.

The end effect is that the instances have unique pathnames. Maybe it ends up as:
"c:\program files (x86)\FoldingHome1\fhome.exe"
and
"c:\program files (x86)\FoldingHome2\fhome.exe"

Then, you'd create new default affinity rules for these pathnames (e.g. '*FolderingHome1*' and '*FolderingHome2*'), being sure to click the checkbox at the bottom of the dialog asking if pathnames should also be matched.

An altnernate method to all this is to use a distinct user context, and have an instance of the governor running in each user context, managing only the processes in that user context.
Software Engineer. Bitsum LLC.

RozzSummer

I've been doing some research on your suggestion of using a junction point to implement what you suggest using pathnames. Before I make any changes, I'd like to confirm the approach and get your advice on whether or not I'm interpreting junction points correctly and in the way Process Lasso can utilize.

In the current configuration, the FAHClient application calls "fahcore_17.exe" for each GPU supported in the system.  If there are 4 GPUs, then 4 instances of "fahcore_17.exe" will be started.  The fahcore_17.exe file lives in C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\fahcore_17.exe

If I understand the creation of a junction point correctly, I would first create four new directories,
C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\1
C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\2
C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\3
C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\4

Then, copy fahcore_17.exe into the "1", "2", "3", and"4" directories.

I would then run: 
junction C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\1 "C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah"
junction C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\2 "C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah"
junction C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\3 "C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah"
junction C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah\4 "C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah"

In doing so, that would cause the FAHClient application to reference any one of the four new directory pathnames as C:\user\rozz\appdata\roaming\fahclient\cores\core_17.fah

Then, in the Process Lasso app when I see four instances of fahcore_17.exe running, I would set the default affinity rules for fahcore_17.exe four times, checking the box to use the path name to each instance of fahcore_17.exe. 

Am I on the right track?

Thank you for your assistance,

Rozz



RozzSummer

Any thoughts/suggested changes on my configuration idea using the junction.exe app? 

I'll appreciate any insight you can provide.  Thank you.