Page 1 of 1

CPU process for GPU folding

Posted: Wed May 03, 2023 3:40 pm
by jchang6
apologies that my observations are based on 7.6.21, but...
What is exactly is the nature of the FahCore_22.exe process?
My observations on 7.6.21 is that the CPU usage is about 1 core/thread, that is, example a 4-core processor, 8 logical processors, the CPU as seen in Task Manager will be about 12% (probably 12.5% for 1/8 of overall available logical processors).
the process normally shows activity on all cores. So, it would that there is one active thread that is bouncing from core to core.
The performance of modern processor/cores is highly dependent on cache hit rate of L1 and L2 cache.
Every time the thread bounces cores, it loses the benefit of L1/L2.
I would think then that affinitizing FahCore_22 to a single core (logical processor) would help.
In doing so, Task Manager shows that one core pegged high.
It is hard to get good data on this because every time one WU finishes, a new FahCore process starts with no affinity setting.
I am not inclined to modifying the FahCore binary with EditBin to hard set the affinity.


I have one old system, a Skylake Xeon E3-1245, 3.5GHz base frequency, in which the thermal paste has probably dried and I throttle the CPU power down to 60%, resulting in 2.38GHz operation to keep temp under control.
This system has a 2080 Super and GPU PPD does not seem to be affected by the forced lower CPU frequency.
How can this be if the normal operation is one thread fully pegging the core?
There does not seem to be GPU PPD difference regardless of whether the FahCore process is running with CPU constrained to different power levels (frequency as well).
So why is FahCore pegging one core if the core running at different frequencies? is it just polling the GPU? In the really old days, there were applications that did this

Re: CPU process for GPU folding

Posted: Wed May 03, 2023 4:20 pm
by Joe_H
The CPU usage is tied to the video driver usage and dispatch of OpenCL or CUDA instructions and either sending or retrieving data to/from the GPU. Nvidia implemented theirs as a spin wait, so while FAHCore_22 is active it keeps usage of a CPU thread continuously to handle dispatching the instructions and data. AMD implemented this as interrupt driven, the driver takes CPU time when instructions and data are ready to be transferred.

Affinity setting may help, but as you noted each start of processing of a WU is in a new process. Some external process would need to be used to set the affinity when a new process running FAHCore_22 started up.

Re: CPU process for GPU folding

Posted: Wed May 03, 2023 8:12 pm
by jchang6
for some reason, I had thought EditBin would let use set process affinity but apparently it does not.
too bad we can't modify the FahCore_xx to start as:
start /affinity x FahCore_22.exe
allowing for different values in case of multiple cards

Re: CPU process for GPU folding

Posted: Wed May 03, 2023 9:30 pm
by calxalot
I think some people use Process Lasso.

Re: CPU process for GPU folding

Posted: Thu May 04, 2023 4:41 pm
by jchang6
awesome on Project Lasso. On my Raptor Lake system, I moved FahCore_22 from the P to E core with no apparent change, GPU is RTX 3060. When I get a 4070 Ti for my Alder Lake system, I will compare P and E cores as well