Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bzamecnik/1d11417b5d1004f259109016b6677361 to your computer and use it in GitHub Desktop.
Save bzamecnik/1d11417b5d1004f259109016b6677361 to your computer and use it in GitHub Desktop.
Power saving mode for NVIDIA GTX 980 Ti.

My NVIDIA GTX 980 Ti being idle eats 53 W (out of 250 W max). Here's how to put to to a power saving mode at 30 W consumption and keep it prepared to run at higher performance automatically when there's a computation running.

TL;DR

sudo nvidia-smi -pm ENABLED -i 0
sudo nvidia-smi -ac 405,135 -i 0

See the current clocks of streaming multiprocessors and memory and the performance state.

nvidia-smi --query-gpu=index,pstate,power.draw,clocks.sm,clocks.mem --format=csv 
index, pstate, power.draw [W], clocks.current.sm [MHz], clocks.current.memory [MHz]
0, P0, 53 W, 1139 MHz, 3505 MHz

Performance state is P0 (highest), power draw is 53 W (high), SM clock: 1139 MHz (quite high).

Is it possible to switch to some idle state that draws less power? The answer is YES. We don't directly switch the performance state, but change the clocks.

First it's necessary to enable the persistence mode. The -i 0 argument in the GPU index (in case of multiple devices).

sudo nvidia-smi -pm ENABLED -i 0

Then we can set the memory and SM clocks together to compatible pair of values.

For given device it's possible to list possible values. Note that there are a few sections by memory clock and then fine-grained values for SM clock.

nvidia-smi -q -d SUPPORTED_CLOCKS

For my GPU the minimum values are 405 MHz for memory and 135 MHz for SM. Let's set them.

sudo nvidia-smi -ac 405,135 -i 0

Bingo! We saved 23 W (~ 43%). Temperature (with water cooling) went down from 43 to 40 deg C.

nvidia-smi --query-gpu=index,pstate,power.draw,clocks.sm,clocks.mem --format=csv 
index, pstate, power.draw [W], clocks.current.sm [MHz], clocks.current.memory [MHz]
0, P8, 30.15 W, 135 MHz, 405 MHz

I tried running some deep learning training and the GPU automatically clocks up to 1341 MHz and then goes down.

For maximum performance we can try set the highest clock manually. In my case it had no effect.

sudo nvidia-smi -ac 3505,1531 -i 0

For Pascal GPUs I observe much less idle power consumption (5-10 W for 1070, 21 W for 1080 Ti).

More info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment