CPU affinity and pinning threads

A forum for discussing FAH-related hardware choices and info on actual products (not speculation).

Moderator: Site Moderators

Forum rules
Please read the forum rules before posting.
Post Reply
bikeaddict
Posts: 186
Joined: Sun May 03, 2020 1:20 am

CPU affinity and pinning threads

Post by bikeaddict »

For the last few days, I've been testing whether pinning CPU task FahCore threads to a specific virtual processor affects performance. Below is the Bash script code run by cron on Linux I threw together to pin the threads:

Code: Select all

i=1
for p in $(ps -eLf | grep FahCore_a | grep -vE "Wrapper|grep|00:00:0" | awk '{print $4}' | sort); do
   #echo $p "-" $i
   taskset -p -c $i $p > /dev/null 2>&1
   i=$((i+1))
done
This is on a machine that leaves the GPU task on core/thread 0 and uses the rest for the CPU task. The messy grep is used to exclude the parent processes that spawn the threads.

Before this change, FAHControl was showing 900K PPD for most WUs. And after pinning, PPD estimates are mostly in the 1.1-1.3M range with rarely any lower. The number of WUs with PPD up to 1.5-1.6M seems higher now. It's possible that the WUs that have been sent in recent days just happen to have higher PPD. I figured I'd check if anyone else has seen the same improvement and provide the script in case anyone else want to do their own testing and report back.
jchang6
Posts: 52
Joined: Sat May 09, 2020 2:13 pm
Hardware configuration: Intel Xeon E3/E5, various generations from Westmere to Skylake. AMD Radeon RX5x00 and nVidia RTX 2080 Super.
Location: Boston
Contact:

Re: CPU affinity and pinning threads

Post by jchang6 »

I would check the WU's. My understanding of the FahCore_22 process (for nVidia GPUs) is that it is polling. Hence, a single core is pegged, bouncing between cores. If you reduce the CPU power/frequency, it doesn't really affect the PPD.
Image
bikeaddict
Posts: 186
Joined: Sun May 03, 2020 1:20 am

Re: CPU affinity and pinning threads

Post by bikeaddict »

This is regarding the CPU WU cores FahCore_a8 and FahCore_a9.
Post Reply