Linux系统下安装好nvidia驱动后,在没有运行任何程序的情况下,发现GPU使用率很高,如图:
由图可见,其中一个K80的使用率99%
解决办法:
执行 nvidia-smi --persistence-mode=1
问题原因(官方解释):
A flag that indicates whether persistence mode is enabled for the GPU. Value is either "Enabled" or "Disabled". When persistence mode is enabled the NVIDIA driver remains loaded even when no active clients, such as X11 or nvidia-smi, exist. This minimizes the driver load latency associated with running dependent apps, such as CUDA programs. For all CUDA-capable products. Linux only.
大意为:linux系统下,在persistence模式是enabled(mode=0)状态时,GPU驱动一直处于加载状态,这样做的目的是减少运行程序(如cuda 程序)时的驱动加载延迟。