iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
⚡️

Investigating the Optimal Power Limit for NVIDIA GPUs

に公開

Introduction

Recently, while thinking I want an RTX 5090, the 575W power consumption is a bit scary, so I started thinking that if I could run it at around 450W, I'd feel a bit more at ease.

However, how do I change the power limit settings? From the BIOS? I thought I'd just look it up before buying, but thanks to a post by Yakamochi @ Chimolog, whom I always follow for reference, I found that changing the power limit is quite easy.

https://x.com/gosrum/status/1969744945050468767

As shown above, I was able to change it easily on Ubuntu as well.

In this article, I will summarize how to automatically change the settings on reboot and an investigation into the optimal power limit for the RTX 3060.


Update 2025-11-13

Ultimately, I purchased the RTX 5090.

https://x.com/gosrum/status/1987439847364256192

Therefore, I'm adding a consideration regarding the optimal power limit for the RTX 5090.

https://x.com/gosrum/status/1988604338265325853

Also, regarding the persistence of power limits, it turned out that additional settings are required when resuming from suspend, so I added that method here to this post.

I plan to summarize in another article why I chose the RTX 5090 over the DGX Spark, RTX PRO 6000, or RTX 5070 Ti Super.


Environment

Checking and Setting Power Limits

Based on the post by Yakamochi @ Chimolog, I've summarized the commands for Ubuntu here for future reference.

  • Checking the current power limit
    We can see that the default power limit is 170W.
$ nvidia-smi
Mon Sep 22 09:51:29 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.65.06              Driver Version: 580.65.06      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        On  |   00000000:01:00.0 Off |                  N/A |
| 97%   67C    P2             50W /  170W |    1403MiB /  12288MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A          251265      C   .../AI/ComfyUI/.venv/bin/python3       1336MiB |
|    0   N/A  N/A          277135      G   /usr/lib/xorg/Xorg                        4MiB |
+-----------------------------------------------------------------------------------------+
  • Checking the range of power limits that can be set
$ nvidia-smi -q -d POWER

==============NVSMI LOG==============

Timestamp                                 : Mon Sep 22 10:59:09 2025
Driver Version                            : 580.65.06
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
    GPU Power Readings
        Average Power Draw                : 20.85 W
        Instantaneous Power Draw          : 20.90 W
        Current Power Limit               : 170.00 W
        Requested Power Limit             : 170.00 W
        Default Power Limit               : 170.00 W
        Min Power Limit                   : 100.00 W
        Max Power Limit                   : 212.00 W
    Power Samples
        Duration                          : 105.53 sec
        Number of Samples                 : 119
        Max                               : 21.93 W
        Min                               : 20.83 W
        Avg                               : 21.27 W
    GPU Memory Power Readings 
        Average Power Draw                : N/A
        Instantaneous Power Draw          : N/A
    Module Power Readings
        Average Power Draw                : N/A
        Instantaneous Power Draw          : N/A
        Current Power Limit               : N/A
        Requested Power Limit             : N/A
        Default Power Limit               : N/A
        Min Power Limit                   : N/A
        Max Power Limit                   : N/A
  • Setting the power limit
    It seems that values from 100W to 212W can be set, so let's try setting it to 120W as a test.
$ sudo nvidia-smi -pl 120
[sudo] password for gosrum: 
Power limit for GPU 00000000:01:00.0 was set to 120.00 W from 120.00 W.
All done.

Check again.

$ nvidia-smi
Mon Sep 22 11:24:40 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.65.06              Driver Version: 580.65.06      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        On  |   00000000:01:00.0 Off |                  N/A |
| 89%   67C    P2            120W /  120W |   11069MiB /  12288MiB |    100%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A          251265      C   .../AI/ComfyUI/.venv/bin/python3      11002MiB |
|    0   N/A  N/A          277135      G   /usr/lib/xorg/Xorg                        4MiB |
+-----------------------------------------------------------------------------------------+

With this, the power limit was successfully set to 120W. You can see that the power usage is kept at or below 120W during video generation in ComfyUI.

How to Automatically Set Power Limits

With the settings above, the power limit will revert to the default value after a reboot.

Therefore, I'll document the method here to ensure the settings are maintained after a reboot.

Initial Setup

  • Creating the service file
# Before creating the service file, check the full path of nvidia-smi
$ which nvidia-smi
/usr/bin/nvidia-smi

# Create the service file using the path you found
$ sudo nano /etc/systemd/system/nvidia-power-limit.service
nvidia-power-limit.service
[Unit]
Description=NVIDIA GPU Power Limit
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -pl 120
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
  • Enable and start the service
$ sudo systemctl enable nvidia-power-limit.service
$ sudo systemctl start nvidia-power-limit.service

When Updating

To update the values, simply run the following commands.

  • Modify the service file
$ sudo nano /etc/systemd/system/nvidia-power-limit.service
nvidia-power-limit.service
[Unit]
Description=NVIDIA GPU Power Limit
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -pl 150  # Changed from 120 to 150
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
  • Apply changes to systemd and restart the service
$ sudo systemctl daemon-reload
$ sudo systemctl restart nvidia-power-limit.service

With this, the settings will now be automatically reflected even after a reboot.

Addendum: Supporting Resume from Suspend

When I measured the power consumption of my RTX 5090 machine with a watt checker, I found it to be around 60W even when idling, as shown below.

https://x.com/gosrum/status/1988452309832265945

As a result, I decided to normally keep it suspended and wake it up via Wake on LAN only when using it, but I noticed that the power limit reverts to its default value upon resuming from suspend.

Below, I'll document how to handle resuming from suspend for future reference.

  • Creating the script nvidia-power-limit
$ sudo nano /lib/systemd/system-sleep/nvidia-power-limit
nvidia-power-limit
#!/bin/bash

case $1 in
  post)
    # Execute after resuming from suspend
    /usr/bin/nvidia-smi -pl 400
    ;;
esac
  • Granting execution permission
$ sudo chmod +x /lib/systemd/system-sleep/nvidia-power-limit

That's it. If you want to update the value, just change /lib/systemd/system-sleep/nvidia-power-limit.

Investigation of Optimal Power Limit Values

The following figure plots two graphs showing the generation time for Wan2.2-Animate-14B, using the default 170W as a baseline.

Power Limit Dependency of Generation Time

  • It might be within the margin of error, but the generation time was shorter at 160W than at 170W.
  • Performance hardly changes until about 150W.

Power Limit Dependency of Power Consumption

  • The power consumption (electricity cost) required to complete the same task decreases monotonically as the power limit is lowered.

Conclusion

Based on the values measured this time, I've summarized the recommended power consumption settings by type.

Type Power Consumption
Minimize electricity costs at all costs 100W–110W
Balanced type 120W–140W
Performance-oriented 150W–160W

For now, I've decided to set mine to 120W. I might increase it to 150W in the future if the speed starts to bother me. 100W seems fine for things like running generations overnight.

Summary

In this article, I summarized the following:

  • How to check and set NVIDIA GPU power limits on Ubuntu
  • How to automatically set power limits on reboot
  • Investigation of the optimal power limit for the RTX 3060

I had been hesitant to buy an RTX 5090 because of power concerns, but knowing that I can limit the power to around 450W makes me feel a bit safer using it, and my desire to buy one has grown significantly.

Well, I probably won't buy it until I see reviews for the DGX Spark, but I'm starting to worry if I can wait for the release of the RTX 5070 Ti Super, which is another option I'm considering.

Thank you for reading this far. See you next time!

Discussion