7950X3D: CPU Sets behave like Affinities

Started by Garouga, October 29, 2023, 07:14:18 AM

Previous topic - Next topic

Garouga

I have a 7950X3D and when I create a rule for CPU sets, the application never uses CPUs outside the set.

This can easily be reproduced with Cinebench: As soon as a CPU sets rule is in place, the application behaves like it has been assigned a hard affinity.

I have disabled the AMD 3D Cache optimization, turned off Windows Game Mode and set the BIOS to prefer the frequency, enabled Performance mode and the Bitsum Highest Performance mode in Process Lasso. However, the problem persists.

From what I understand, the application should "spill over" to other CPUs if more threads are needed? Might I be missing something?

Jeremy Collake

#1
Your experience is a common disappointment with CPU Sets. Since they are a native Windows feature, we have no control over how they are enforced, or when spill-over is allowed. It seems to vary a lot between CPU models, and the parameters Windows uses are still mysterious.

We hope to better document the behavior of CPU Sets in the future. For the moment, this is the only answer I have.
Software Engineer. Bitsum LLC.

Garouga

Thanks for the information. It would be interesting to know how CPU Sets behave on Intels CPUs with their P-Cores and E-Cores.

When I heard that games like Starfield and Metro Exodus behaved weirdly when affinity-locked, the CPU Sets seemed to be the perfect solution. Everything is working fine for now, though I haven't tried those games yet.

Garouga

Quote from: Jeremy Collake on October 30, 2023, 07:01:56 AM...
We hope to better document the behavior of CPU Sets in the future. For the moment, this is the only answer I have.

I did some quick testing and found the following (odd?) behavior in Cinebench when enforcing confilcting rules:
  • Using Process Lasso Pro: Rules for CPU Sets (0-15) and CPU affinities (16-31) --> The affinity is ignored and the process runs exclusively on threads 0-15. According to Microsoft's documentation,
    QuoteIf a thread or process has a restrictive affinity mask set, the affinity mask is respected above any conflicting CPU Set assignment
    However, this doesn't seem to be the case. The rule for CPU Sets overrides any affinity assignment.
  • Using Process Lasso Pro: Rules for CPU Sets (0-15) and using Windows 11 Task Manager: CPU affinities (16-31) --> Nothing happens, Cinebench cannot use any of the CPUs.

It appears that CPU affinities are handled differently in Process Lasso and the Windows 11 Task Manager. Additionally, the CPU Sets do not behave according to Microsofts own documentation. Is this an expected behavior of Process Lasso or could this be a bug?

Jeremy Collake

#4
That's an interesting observation!

I believe any perceived difference in behavior is due to the order of operations (affinity or sets applied first), and/or if the changes are made before or after the threads begin their work, with the latter being most likely.

In some quick testing, current Windows 11 builds will not enforce a CPU affinity change to the process on already running threads. In other words, when a thread is already scheduled, it won't be immediately moved if the process's affinity is changed.

We will need to study this more, but it is not due to any bug in Process Lasso. Thank you for bringing it to our attention.
Software Engineer. Bitsum LLC.

Garouga

Thanks for the quick reply.

It does seem like the CPU Sets rule from Process Lasso it applied after the threads start to work. I can see all cores working for a second or two after the Cinebench run has started. After that brief period of time, only the cores assigned in the CPU Set continue to run.