process affinity
-
Hello, in my logs it says "info: Process - Failed to update the process affinity, this may impact your framerate". Any idea why and how to solve it ? game_22083238.log
-
The warning originates from here:
if SetProcessPriority and GetProcessAffinityMask and SetProcessAffinityMask then -- priority values can be found at: -- - https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setpriorityclass local success = SetProcessPriority(0x00000080) if success then LOG("Process - priority set to: 'high'") else LOG("Process - Failed to adjust process priority, this may impact your framerate") end -- affinity values acts like a bit mask, we retrieve the mask and -- shift it if we think there are sufficient computing units local success, processAffinityMask, systemAffinityMask = GetProcessAffinityMask(); if success then -- system has 24 (logical) computing units or more, skip the first two computing units and all cores beyond the first 24. We need -- to do this because of floating point imprecision - we simply can't deduct a few digits to prevent using the first two cores if systemAffinityMask >= 16777215 then processAffinityMask = 16777212 -- 2 ^ 24 - 3 - 1 -- system has 6 (logical) computing units or more, skip first two computing units elseif (systemAffinityMask >= 63) then processAffinityMask = systemAffinityMask - 3 -- (2 ^ 6 - 1) - 3 end -- update the afinity mask if processAffinityMask != systemAffinityMask then local success = SetProcessAffinityMask(processAffinityMask); if success then LOG("Process - affinity set to: " .. tostring(processAffinityMask)) else LOG("Process - Failed to adjust the process affinity, this may impact your framerate") end else LOG("Process - Failed to update the process affinity, this may impact your framerate") <------------------------- end else LOG("Process - Failed to retrieve the process affinity, this may impact your framerate") end else LOG("Process - Failed to find process priority and affinity related functions, this may impact your framerate") end
What CPU do you have, and do you use software to adjust the affinity manually?
-
i have i5 2500k, i dont use any software to adjust it manualy
-
Oh, that makes sense then - the CPU has only 4 cores and then this feature is disabled. The feature disables the first core because the first core is also used by a lot of other processes. This may cause stutters. But it is only enabled when the CPU has at a minimum of 6 or more cores. The reason for that is simple: if you have 4 and you drop one then 3 may not be sufficient to run the game smoothly at all.
In your case, the warning is meaningless in my opinion .