使用gpu-burn对GPU进行显卡压测
gpu-burn
·
环境信息:RTX 3060
下载gpu-burn仓库
git clone https://github.com/wilicc/gpu-burn.git
编辑配置文件
cd gpu-burn
vi Makefile
gpu_burn: gpu_burn-drv.o compare.ptx
g++ -o $@ $< -O3 ${LDFLAGS}
修改为
gpu_burn: gpu_burn-drv.o compare.ptx
g++ -o $@ $< -O3 ${LDFLAGS} -static-libgcc -static-libstdc++
编译并测试
修改后进行编译,编译完成后在其他机器拷贝后就可以直接使用了
make
./gpu_burn 3600(测试时间)
# 配合ansible使用
ansible -i gpu.txt all -m shell -a "cd /root/gpu-burn/ && ./gpu_burn 3600" -f 50
root@ubuntu:~# nvidia-smi
Fri Aug 8 01:24:46 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.57.08 Driver Version: 575.57.08 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| 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 ... Off | 00000000:01:00.0 On | N/A |
| N/A 66C P0 79W / 80W | 5267MiB / 6144MiB | 100% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2875 G /usr/lib/xorg/Xorg 183MiB |
| 0 N/A N/A 5821 G /usr/bin/gnome-shell 50MiB |
| 0 N/A N/A 10684 G .../5751/usr/lib/firefox/firefox 187MiB |
| 0 N/A N/A 42674 G /usr/bin/nautilus 45MiB |
| 0 N/A N/A 69647 C ./gpu_burn 4728MiB |
+-----------------------------------------------------------------------------------------+
更多推荐
所有评论(0)