Question - Define An All Process Policy

Started by nah1982, March 16, 2023, 09:07:01 PM

Previous topic - Next topic

nah1982

I basically want to define a policy that if something isn't a "Microsoft" service/application, or on an exclude list, all processes are pushed to a set of cores.

Can that be done?

It's a pain to manage new / rebuilt installs and new applications / services I wanted restricted to a specific section.

This is for 2x reasons:

1. I prefer to keep everything I can off cores 0&1 to allow Windows room to work; it does wonders for hanging.

2. With CPUs like Ryzen 7950X3D, I'm using ParkControl as I want everything active, but I want to auto force certain things to the non-cache cores unless otherwise directed.

Any feedback or thoughts on how to achieve are appreciated.

Sincerely,
Nathaniel

Jeremy Collake

#1
You can do it using advanced process match Regular Expressions.

You'd create a set of *ordered* rules in the CPU Affinity rules dialog, menu location 'Options / CPU / CPU Affinities...'.

Conceptual example on a CPU with 16 logical cores (threads):

Affinity A = 0-15
Affinity B = 2-15

PatternAffinityDescription
/^([^,]*,){3}.*\\windows.*/Affinity AProcesses running from Windows basedir
/^([^,]*,)(system),/Affinity ASystem user processes
/^([^,]*,){2}(chrome\.exe)|(firefox\.exe).*,/Affinity AAn exclusion list, in this case chrome.exe or firefox.exe
*Affinity BMatch everything else

For some system and protected processes, you may see logged errors where permissions are insufficient to set the affinity. You can ignore those errors, or add those processes to your exclusion list.

If you try it, let me know how it goes!
Software Engineer. Bitsum LLC.

nah1982

Quote from: Jeremy Collake on March 18, 2023, 10:16:06 AMYou can do it using advanced process match Regular Expressions.

You'd create a set of *ordered* rules in the CPU Affinity rules dialog, menu location 'Options / CPU / CPU Affinities...'.

Conceptual example on a CPU with 16 logical cores (threads):

Affinity A = 0-15
Affinity B = 2-15

PatternAffinityDescription
/^([^,]*,){3}.*\\windows.*/Affinity AProcesses running from Windows basedir
/^([^,]*,)(system),/Affinity ASystem user processes
/^([^,]*,){2}(chrome\.exe)|(firefox\.exe).*,/Affinity AAn exclusion list, in this case chrome.exe or firefox.exe
*Affinity BMatch everything else

For some system and protected processes, you may see logged errors where permissions are insufficient to set the affinity. You can ignore those errors, or add those processes to your exclusion list.

If you try it, let me know how it goes!

I will definitely give it a shot this week and let you know how it goes.

Thanks!

nah1982

#3
Quote from: Jeremy Collake on March 18, 2023, 10:16:06 AMYou can do it using advanced process match Regular Expressions.

You'd create a set of *ordered* rules in the CPU Affinity rules dialog, menu location 'Options / CPU / CPU Affinities...'.

Conceptual example on a CPU with 16 logical cores (threads):

Affinity A = 0-15
Affinity B = 2-15

PatternAffinity

EDIT:
I have applied the original policies and they seem to be working as expected minus the above question. Trying to now deal with ParkControl vs. Windows XBox Game Bar and auto-parking.
Description
/^([^,]*,){3}.*\\windows.*/Affinity AProcesses running from Windows basedir
/^([^,]*,)(system),/Affinity ASystem user processes
/^([^,]*,){2}(chrome\.exe)|(firefox\.exe).*,/Affinity AAn exclusion list, in this case chrome.exe or firefox.exe
*Affinity BMatch everything else

For some system and protected processes, you may see logged errors where permissions are insufficient to set the affinity. You can ignore those errors, or add those processes to your exclusion list.

If you try it, let me know how it goes!

As a follow-on question; is there a way to have it ignore set processes, e.g., don't try to change the affinity for something?

Example: BitDefender and certain System processes don't like their affinity touched at all; they just error out. Is it possible to set an ignore flag for those entirely and not to set at all?

nah1982

#4
Additionally, I tried using similar for exclusion of a folder under ProBalance Exclusions using the below, but it didn't apply it as expected.

/^([^,]*,){3}.*\\games.*/

Any thoughts there?


I figured it out on this one. NVM.