Author Topic: Question - CPU Affinity Limit w/Upper Range Using Wildcard  (Read 697 times)

Offline nah1982

  • New
  • *
  • Posts: 8
Question - CPU Affinity Limit w/Upper Range Using Wildcard
« on: December 18, 2020, 11:37:57 PM »
Hello and thank you for any help.

Is there a way to limit CPU Affinities in a wildcard manner, e.g. instead of having 0 - 15 normal, which I limit most processes to 2 - 15, I limit them to 2 to * such that they can use any cores from 2 onward.

I ask, because as a Threadripper user, sometimes I need to disable cores for certain things, and when I do it causes Bitsum to hangup on processes I've previously limited to 2 to 31 when all cores are running, but now only 0 to 15 are running. It's constantly trying to enforce the 2 - 32, but only 0 - 15 are active, so it's erroring out, and I have to disable the engine to stop hangups. I'd like it to dynamically adjust the top end core #, but leave the low end e.g. 2, intact so as that # shifts I can leave the engine running.

Thanks again if you can help.

Sincerely,
Nathaniel

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5384
  • Gender: Male
  • The Lasso
    • Bitsum
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #1 on: December 19, 2020, 09:49:06 AM »
Enabling the CPU affinity rules to properly function after changes to the system CPU core count is under consideration (issue #777).

Allowing 0-* type rules is an option.

I don't have any ETA to give you, but it is on the radar. I'll post here when progress occurs.

Thanks for the feedback!
Software Engineer. Bitsum LLC.

Offline nah1982

  • New
  • *
  • Posts: 8
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #2 on: December 19, 2020, 01:44:25 PM »
Enabling the CPU affinity rules to properly function after changes to the system CPU core count is under consideration (issue #777).

Allowing 0-* type rules is an option.

I don't have any ETA to give you, but it is on the radar. I'll post here when progress occurs.

Thanks for the feedback!

Understood; thanks for the feedback!

I'm not as advanced a use case as some; it does a great job, and I set and forget it until something goes wrong, and this would just continue that theme for me. :)

Otherwise, love the product; bought it for other family members as well and have recommended to friends/co-workers, so keep up the great work!

Thanks.

Sincerely,
Nathaniel

Offline nah1982

  • New
  • *
  • Posts: 8
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #3 on: December 20, 2020, 11:13:38 PM »
Enabling the CPU affinity rules to properly function after changes to the system CPU core count is under consideration (issue #777).

Allowing 0-* type rules is an option.

I don't have any ETA to give you, but it is on the radar. I'll post here when progress occurs.

Thanks for the feedback!

An additional feature potential is the exclusion of CPUs explicitly vs. selecting CPUs explicitly to run on; eliminates the need for N -> *

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5384
  • Gender: Male
  • The Lasso
    • Bitsum
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #4 on: December 21, 2020, 08:40:43 AM »
An inverted CPU affinity is an interesting idea.

However, to avoid complexity, probably I will just strip the unavailable CPUs from the bitmask. Then suggest use of named configuration profiles for dramatic changes to the system config like this.

I will try to get to this soon so we can trial its efficacy.
Software Engineer. Bitsum LLC.

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5384
  • Gender: Male
  • The Lasso
    • Bitsum
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #5 on: December 21, 2020, 09:43:02 AM »
I went ahead and made this change (strip unavailable CPUs from CPU affinities prior to applying them) to v9.8.8.27 beta.

If you try it, let me know how it treats you. I believe it is the simplest and most effective way to handle this scenario. It is effectively the same as n-*.
« Last Edit: December 21, 2020, 09:48:43 AM by Jeremy Collake »
Software Engineer. Bitsum LLC.

Offline nah1982

  • New
  • *
  • Posts: 8
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #6 on: December 24, 2020, 01:38:23 PM »
I went ahead and made this change (strip unavailable CPUs from CPU affinities prior to applying them) to v9.8.8.27 beta.

If you try it, let me know how it treats you. I believe it is the simplest and most effective way to handle this scenario. It is effectively the same as n-*.

Wow! Wasn't expecting it to be tackled for a while.  :)

Just downloaded and installed / testing. So it appears to stop erroring out, however, it still is attempting to apply the rules constantly, like it's detecting they're still not set to the original rule vs. taking the rule and only applying it up to the maximum available.  :-\

The overall usage of it's attempt to do so seems to have dropped e.g. little to no impact; it's just still logging those attempts.

Otherwise, I'll continue to test and let you know if I encounter anything else. Thanks!

Sincerely,
Nathaniel

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5384
  • Gender: Male
  • The Lasso
    • Bitsum
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #7 on: December 26, 2020, 02:09:09 PM »
Quote
..it still is attempting to apply the rules constantly, like it's detecting they're still not set to the original rule vs. taking the rule and only applying it up to the maximum available.

Thank you for that! Please hold for further work.
Software Engineer. Bitsum LLC.

Offline Jeremy Collake

  • Administrator
  • Member#
  • *****
  • Posts: 5384
  • Gender: Male
  • The Lasso
    • Bitsum
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #8 on: December 27, 2020, 01:08:35 PM »
Give 9.8.8.29 beta a spin. Let me know how it goes!
Software Engineer. Bitsum LLC.

Offline nah1982

  • New
  • *
  • Posts: 8
Re: Question - CPU Affinity Limit w/Upper Range Using Wildcard
« Reply #9 on: December 29, 2020, 09:41:20 PM »
Give 9.8.8.29 beta a spin. Let me know how it goes!

Thanks for the follow-up! I'm on 9.8.8.31 now. It still seems to be attempting, but only once, and then stops, accepting the assignment of 2-15 vs 2-31. Less logging for sure, and less hitching on that. Has been working like a charm all day. Unless it reverts in the future, this seems to be functioning as intended. Thanks again so much for looking at this so quickly!

Sincerely,
Nathaniel