Jump to content

Folding - Beating the Heat in Summertime

Here in Eastern Ontario we have Time of Use (ToU) Electricity Rates that increase the price of Electricity during "Mid Peak" and "On Peak" times during the day.

 

If your running multiple GPUs Folding you've likely noticed the increases in your Electricity Bill and here are some hints on what you can do to keep folding during the hot months and not live in a sweat box and pay through the nose.

 

The very first change you should contemplate is reducing the GPU's Power Limit. During normal folding in the Fall, Winter and Spring months with 10-12 GPUs I run my cards about 20% above the minimum Power Limit. I find this gives me around 90% of the PPD for 30-40% less power. NVidia Pascal and Turing GPUs, like modern CPUs, tend to run close to the edge of stability and at "stock" 100% Power Targets are not very efficient. During the summer months I run the GPUs at the minimum Power Limits for an even greater decease in Power with only a slight lessening of PPD.

 

While using a GUI like the NVidia Control Panel or MSI Afterburner you can lower the power limits you can also use the NVidia System Management Interface:

nvidia-smi -i 0 -pl 90

Here we are forcing the power-limit on GPU 0 to 90W. This will work in either Windows or Linux.

 

You will also want to enable "Persistence Mode" so the Power Limit is not reset to the Default after the current task is finished. This command:

nvidia-smi -pm 1

will enable persistence mode for all GPUs. A specific GPU can be specified also using the "-i <X>" switch where "<X> is the Device ID shown in

nvidia-smi

output.

 

Scheduling Folding only during less expensive ToU periods can be accomplished but will take a bit of work to setup. Here we leverage the ability of the FAHClient program to send commands to a running "Slot" (GPU).

 

What we need to do is tell the GPU slots to "Finish" about half the average time it takes for that GPU to complete a Work Unit (WU) before the start of the ToU rate period. In my case my GPUs typically complete a WU in about 3 hours when running at minimum power limits so I schedule the "Finish" command to run at 05:30 as the ToU period here starts at 07:00. This results in the GPUs finishing their current WUs then "Pausing." When the ToU period ends you schedule a "Un-Pause" command to be sent to resume folding. In my case the ToU rates end at 19:00.

 

In Linux you could use the "cron" scheduler thus:

# use /bin/bash to run commands, instead of the default /bin/sh
SHELL=/bin/bash
# Time of Day Folding - Summer
#Mid-Peak 07:00 - 11:00
30 5 * * 1-5 /usr/bin/FAHClient --send-finish
#On-Peak 11:00-17:00
#30 9 * * 1-5 /usr/bin/FAHClient --send-finish
#Mid-Peak 17:00 - 19:00
#00 17 * * 1-5 /usr/bin/FAHClient --send-unpause
#Off-Peak 19:00-07:00
00 19 * * 1-5 /usr/bin/FAHClient --send-unpause

Windows users can utilize the Command Scheduler and the same commands:

'C:\Program Files (x86)\FAHClient\FAHClient.exe --send-finish'
'C:\Program Files (x86)\FAHClient\FAHClient.exe --send-unpause'

The result looks something like this:

ToU_Power.jpg.43ed510791e22c3afff0de412c8974bd.jpg

Here 5 of my systems are scheduled to "Finish" at 05:30 and by 07:00 my GPU power consumption has dropped from 1kW to 300W with the last couple of Slots "Pausing" by ~07:20. Note: I am also running some BOINC tasks on the Blue and Dark Red systems accounting for the periodic power spikes.

 

And here's what it looks like over the last couple of weeks:

ToU_Power_14days.thumb.jpg.7083997c6315cfefce79bbc288cb4be3.jpg

So you can see I run 24hours during weekends and holidays and about 12 hours (19:00-07:00) during weekdays when ToU rates are in effect.

 

FaH BOINC HfM

Bifrost - 6 GPU Folding Rig  Linux Folding HOWTO Folding Remote Access Folding GPU Profiling ToU Scheduling UPS

Systems:

desktop: Lian-Li O11 Air Mini; Asus ProArt x670 WiFi; Ryzen 9 7950x; EVGA 240 CLC; 4 x 32GB DDR5-5600; 2 x Samsung 980 Pro 500GB PCIe3 NVMe; 2 x 8TB NAS; AMD FirePro W4100; MSI 4070 Ti Super Ventus 2; Corsair SF750

nas1: Fractal Node 804; SuperMicro X10sl7-f; Xeon e3-1231v3; 4 x 8GB DDR3-1666 ECC; 2 x 250GB Samsung EVO Pro SSD; 7 x 4TB Seagate NAS; Corsair HX650i

nas2: Synology DS-123j; 2 x 6TB WD Red Plus NAS

nas3: Synology DS-224+; 2 x 12TB Seagate NAS

dcn01: Fractal Meshify S2; Gigabyte Aorus ax570 Master; Ryzen 9 5900x; Noctua NH-D15; 4 x 16GB DDR4-3200; 512GB NVMe; 2 x Zotac AMP 4070ti; Corsair RM750Mx

dcn02: Fractal Meshify S2; Gigabyte ax570 Pro WiFi; Ryzen 9 3950x; Noctua NH-D15; 2 x 16GB DDR4-3200; 128GB NVMe; 2 x Zotac AMP 4070ti; Corsair RM750x

dcn03: Fractal Meshify C; Gigabyte Aorus z370 Gaming 5; i9-9900k; BeQuiet! PureRock 2 Black; 2 x 8GB DDR4-2400; 128GB SATA m.2; MSI 4070 Ti Super Gaming X; MSI 4070 Ti Super Ventus 2; Corsair TX650m

dcn05: Fractal Define S; Gigabyte Aorus b450m; Ryzen 7 2700; AMD Wraith; 2 x 8GB DDR 4-3200; 128GB SATA NVMe; Gigabyte Gaming RTX 4080 Super; Corsair TX750m

dcn06: Fractal Focus G Mini; Gigabyte Aorus b450m; Ryzen 7 2700; AMD Wraith; 2 x 8GB DDR 4-3200; 128GB SSD; Gigabyte Gaming RTX 4080 Super; Corsair CX650m

Link to comment
Share on other sites

Link to post
Share on other sites

Some time ago, I mashed this bash script together to set my nVidia cards to 75% of the default power draw:

PERCENT=0.75
for UUID in `nvidia-smi -L |cut -d: -f3 |cut -d\) -f1 |awk '{print $1}'`; do
	DEFAULT=`nvidia-smi -i $UUID -q -d POWER |grep 'Default Power' |cut -d: -f2 |awk '{print $1}'`
	MIN=`nvidia-smi -i $UUID -q -d POWER |grep 'Min Power' |cut -d: -f2 |awk '{print $1}'`
	SET=`echo $DEFAULT $MIN $PERCENT |awk '{printf "%f", ( $1 * $3 < $2 ? $2 : $1 * $3 )}'`
	nvidia-smi -i $UUID -pl $SET
done

It can handle any number of cards with varying power limits, as well as automatically capping the low end to the minimum supported power level.

 

EDIT 2023/11/09:

Recent versions of nvidia-smi 5xx.xx.xx (guessing in the 530s) changed the query output so it broke my script. Here is an updated one:

PERCENT=0.75
for UUID in `nvidia-smi -L |cut -d: -f3 |cut -d\) -f1 |awk '{print $1}'`; do
        DEFAULT=`nvidia-smi -i $UUID -q -d POWER |grep 'Default Power' |head -n1 |cut -d: -f2 |awk '{print $1}'`
        MIN=`nvidia-smi -i $UUID -q -d POWER |grep 'Min Power' |head -n1 |cut -d: -f2 |awk '{print $1}'`
        SET=`echo $DEFAULT $MIN $PERCENT |awk '{printf "%f", ( $1 * $3 < $2 ? $2 : $1 * $3 )}'`
        nvidia-smi -i $UUID -pl $SET
done

Keeping the old version here as well for the older versions of nvidia-smi, just in case people are still folding with older GPUs.

CPU Intel i7-7700 | Cooling Noctua NH-D14 SE2011 | Motherboard ASUS ROG Strix Z270F Gaming | RAM Corsair Vengeance LPX 3.6GHz 32GB | GPU EVGA GeForce RTX 3070 FTW3 Ultra Gaming |

Case Fractal Design Define R5 | Storage Samsung 980 PRO 500GB, Samsung 970 EVO+ "v2" 2TB | PSU Corsair RM850x 2021 | Display ASUS VP247QG + Samsung SyncMaster T220 | OS Garuda Linux

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×