0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

手っ取り早くGPUの使用状況を確認する

Posted at

nvidia-smi -l 5でGPUの使用状況を継続的に確認することができますが、これだと1ステップあたりの行数が多くて時系列での傾向を把握するのが難しいです。
その際に--query-gpuオプションを使うことで結果が見やすくなります。

$ nvidia-smi --query-gpu=timestamp,memory.used --format=csv -l 5
timestamp, memory.used [MiB]
2020/05/31 14:20:46.035, 0 MiB
2020/05/31 14:20:51.036, 0 MiB
2020/05/31 14:20:56.037, 0 MiB
2020/05/31 14:21:01.038, 0 MiB
2020/05/31 14:21:06.038, 1472 MiB
2020/05/31 14:21:11.039, 1472 MiB
2020/05/31 14:21:16.040, 2270 MiB
2020/05/31 14:21:21.040, 2270 MiB
2020/05/31 14:21:26.041, 2270 MiB
2020/05/31 14:21:31.042, 2270 MiB
2020/05/31 14:21:36.042, 2270 MiB
2020/05/31 14:21:41.043, 2270 MiB
2020/05/31 14:21:46.044, 2270 MiB
2020/05/31 14:21:51.044, 2270 MiB
2020/05/31 14:21:56.045, 2270 MiB
2020/05/31 14:22:01.046, 0 MiB
2020/05/31 14:22:06.046, 0 MiB

タイムスタンプが付けられるのは地味に便利。どのタイミングでGPUメモリが使われているのかわかりやすいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?