ama*_*usk 8 server nvidia power-management headless gpu
I am running a headless server with an Nvidia GPU. Even when the GPU is not doing any work, it is consuming about 25 Watts of power:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.26 Driver Version: 430.26 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 950 Off | 00000000:01:00.0 Off | N/A |
| 0% 61C P0 26W / 110W | 0MiB / 2001MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)
Is there a way to completely turn off power delivery to the GPU when it is not in use?
I tried
sudo prime-select intel
Which does cause nvidia-smi to stop working, but a power meter connect to the wall shows exactly the same power consumption with either intel or nvidia selected.
Completely removing the GPU reduces the power consumption by about 30 Watts as expected.
The main purpose is to save power and costs during idle operations, with an option to spin up the GPU when it is needed (remotely via ssh).
可以看出GPU使用的是Performance模式P0,该模式下卡的功耗非常高。在空闲状态下,理想情况下它应该回到 P8 模式,这样消耗的电量会更少。
我按照以下步骤来改变行为。假设您使用的是 Linux:
您需要机器的 sudo 权限。首先,启用持久化模式:
sudo nvidia-smi -pm 1
Run Code Online (Sandbox Code Playgroud)
然后,重置 GPU 时钟:
sudo nvidia-smi -rgc
Run Code Online (Sandbox Code Playgroud)
注意:要了解有关这些命令的更多信息,请键入
nvidia-smi --help
Run Code Online (Sandbox Code Playgroud)
这些 OPTIMUS 组合解决方案专为 Windows 操作系统而设计。
从之前的观察来看,NVIDIA 卡似乎在 Windows 操作系统上完全关闭。我的假设是 BIOS 以不同的方式处理来自 Windows 操作系统的调用,而且它应该如此。
我现在没有其中一个来测试这种方法,但仍然值得一试。
方法是首先禁用ACPI OSI 内置操作系统供应商字符串,然后将Windows 7报告为当前操作系统。有点对 BIOS 撒谎……默认情况下,Linux 内核总是这样做,但这是一种更受控制的方法。
为此,首先/etc/default/grub像这样编辑:
sudo nano /etc/default/grub
Run Code Online (Sandbox Code Playgroud)
然后,添加选项acpi_osi=!和 ,acpi_osi=\"Windows 2009\"如下GRUB_CMDLINE_LINUX_DEFAULT所示:
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=! acpi_osi=\"Windows 2009\""
Run Code Online (Sandbox Code Playgroud)
然后Ctrl,按+保存并关闭文件,x然后按 prss y,然后按Enter。
之后,像这样更新 GRUB:
sudo update-grub
Run Code Online (Sandbox Code Playgroud)
最后,重新启动系统并测试禁用 NVIDIA 卡的方式是否有所不同。
然而,与专有的 NVIDIA 驱动程序相比,这种方法在使用开源驱动程序nouveau和VGA Switcheroo时可能会取得更高的成功率。
如需进一步阅读,请参阅内核参数。
| 归档时间: |
|
| 查看次数: |
1311 次 |
| 最近记录: |