How to use CLI to set memory, CPU and powerlimit settings?

I have a 1070TI and I am looking to set:

powerlimit=125 watts
memory clock=+700
gpu clock=+200

I am able to do that using 3rd party software. How can I do that using the nvidia command line programs and then check that it accepted the new parameters?

Here is what I have so far:

sudo nvidia-smi -pm 1
	Enabled persistence mode for GPU 00000000:01:00.0.
	Enabled persistence mode for GPU 00000000:02:00.0.
	Enabled persistence mode for GPU 00000000:03:00.0.
	All done.

sudo nvidia-smi -i 0 -pl 125

	Power limit for GPU 00000000:01:00.0 was set to 125.00 W from 125.00 W.
	All done.

sudo nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
sudo nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[2]=700
sudo nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[3]=700

sudo nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[2]=200
sudo nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=200

	
	sudo nvidia-settings -q GPUCurrentClockFreqsString
	
	  Attribute 'GPUCurrentClockFreqsString' (19_1_4:0.0): nvclock=1721, nvclockmin=139, nvclockmax=1911, nvclockeditable=1,
	  memclock=3802, memclockmin=3802, memclockmax=3802, memclockeditable=1, memTransferRate=7604, memTransferRatemin=7604,
	  memTransferRatemax=7604, memTransferRateeditable=1
	  Attribute 'GPUCurrentClockFreqsString' (19_1_4:0[gpu:0]): nvclock=1721, nvclockmin=139, nvclockmax=1911,
	  nvclockeditable=1, memclock=3802, memclockmin=3802, memclockmax=3802, memclockeditable=1, memTransferRate=7604,
	  memTransferRatemin=7604, memTransferRatemax=7604, memTransferRateeditable=1
	  Attribute 'GPUCurrentClockFreqsString' (19_1_4:0[gpu:1]): nvclock=1847, nvclockmin=177, nvclockmax=1949,
	  nvclockeditable=1, memclock=5005, memclockmin=5005, memclockmax=5005, memclockeditable=1, memTransferRate=10010,
	  memTransferRatemin=10010, memTransferRatemax=10010, memTransferRateeditable=1
	  Attribute 'GPUCurrentClockFreqsString' (19_1_4:0[gpu:2]): nvclock=1797, nvclockmin=164, nvclockmax=1936,
	  nvclockeditable=1, memclock=5005, memclockmin=5005, memclockmax=5005, memclockeditable=1, memTransferRate=10010,
	  memTransferRatemin=10010, memTransferRatemax=10010, memTransferRateeditable=1

It seems like I have the power limit and probably the memory clock set but not core clock. Did I make a mistake and is there a way to verify it took the settings?

I’m curious who told you to use sudo.

The nvidia-settings utility doesn’t require root, moreover sudo might completely wreck things because it might reset the DISPLAY variable.

I added sudo because one of the commands I had used at some point gave an error without it. I will keep that in mind in case it causes a problem.

I found that I can check that it’s taking the correct values using:

nvidia-smi -i 0 -q

    Power Readings
        Power Management            : Supported
        Power Draw                  : 123.36 W
        Power Limit                 : 125.00 W
        Default Power Limit         : 180.00 W
        Enforced Power Limit        : 125.00 W
        Min Power Limit             : 90.00 W
        Max Power Limit             : 217.00 W
    Clocks
        Graphics                    : 1733 MHz
        SM                          : 1733 MHz
        Memory                      : 3802 MHz
        Video                       : 1556 MHz

I also tried using “sudo nvidia-xconfig -a --cool-bits=31 --allow-empty-initial-configuration” but it doesn’t seem to matter.

The 3rd party program I used to overclock it previously is ubuntu based so I know it is possible to do this. I am pretty sure the thing I need to change is “Clocks… Graphics… 1733 MHz”

I believe “nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[2]=200” should be affecting that value but it is not. Does someone know what I’m doing wrong?

Setup:

  • Ubuntu 17.10 Server
  • 4.13.0-21-generic x86_64
  • Driver Version: 387.34 Linux
  • Running without XServer

I have issues changing the applications-clocks of my GTX 1070TI

nvidia-smi -ac 3802,1885
Setting applications clocks is not supported for GPU 00000000:05:00.0.
All done.

Cannot use nvidia-settings or nvidia-xconfig because there is no X-Server running.

What are my options to adapt the application clocks (memory,graphics)?

PowerMizer Settings:

Please go to the NVIDIA X Server Settings by clicking Show Applications.

Performance Levels inlcuding Level, Graphics Clock and Memory Transfer Rate.

  1. GPU 0 - (Geforce RTX 20XX)

  2. PowerMizer: Set Performance Levels to any options including 0, 1, 2, 3, 4, of which 4 is the Prefer Maximum Performace. It is P0.

  3. Check nvidia-smi: RTX 20XX has been changed from P8 to P0.

Please remember your GPU is what you have bought. RTX 20XX is the symbol name.

My question is how GPU allocates as more as GPU memory. My test is that GPU allocates GPU memory in the ad hoc way. GPU usually allocates GPU memory as less as possible. In the rare time, it allocates the GPU memory as much as possible. But the Deep Learning training time varies dramatically.

Notes;

Do not consider both the GPU Memory Occupation for the DNN Model and the GPU Memory Occupation Per Sample x Batch Size.

Cheers.