Process Control Monitor を使用して PCIe ソケットのランタイム帯域幅を計算するにはどうすればよいですか?

Process Control Monitor を使用して PCIe ソケットのランタイム帯域幅を計算するにはどうすればよいですか?

私はディープラーニングに取り組んでおり、GPU パイプラインのボトルネックを特定しようとしています。

私たちは、4 つの NVIDIA Titan RTX を搭載した Intel Xeon マザーボードで Ubuntu を実行しています。GPU メモリの使用率は約 97% ですが、nvidia-smi で測定された GPU 使用率は非常に低いようです。

それで、バスがボトルネックになっているかどうかを確認しようとしています。

ダウンロードしましたPCMPCIe 3.0 x16 トラフィックを監視するためにこれを実行しています。

Processor Counter Monitor: PCIe Bandwidth Monitoring Utility 
 This utility measures PCIe bandwidth in real-time

 PCIe event definitions (each event counts as a transfer): 
   PCIe read events (PCI devices reading from memory - application writes to disk/network/PCIe device):
     PCIeRdCur* - PCIe read current transfer (full cache line)
         On Haswell Server PCIeRdCur counts both full/partial cache lines
     RFO*      - Demand Data RFO
     CRd*      - Demand Code Read
     DRd       - Demand Data Read
   PCIe write events (PCI devices writing to memory - application reads from disk/network/PCIe device):
     ItoM      - PCIe write full cache line
     RFO       - PCIe partial Write
   CPU MMIO events (CPU reading/writing to PCIe devices):
     PRd       - MMIO Read [Haswell Server only] (Partial Cache Line)
     WiL       - MMIO Write (Full/Partial)
...
Socket 0: 2 memory controllers detected with total number of 6 channels. 3 QPI ports detected. 2 M2M (mesh to memory) blocks detected.
Socket 1: 2 memory controllers detected with total number of 6 channels. 3 QPI ports detected. 2 M2M (mesh to memory) blocks detected.
Trying to use Linux perf events...
Successfully programmed on-core PMU using Linux perf
Link 3 is disabled
Link 3 is disabled
Socket 0
Max QPI link 0 speed: 23.3 GBytes/second (10.4 GT/second)
Max QPI link 1 speed: 23.3 GBytes/second (10.4 GT/second)
Socket 1
Max QPI link 0 speed: 23.3 GBytes/second (10.4 GT/second)
Max QPI link 1 speed: 23.3 GBytes/second (10.4 GT/second)

Detected Intel(R) Xeon(R) Gold 5122 CPU @ 3.60GHz "Intel(r) microarchitecture codename Skylake-SP" stepping 4 microcode level 0x200004d
Update every 1.0 seconds
delay_ms: 54
Skt | PCIeRdCur |  RFO  |  CRd  |  DRd  |  ItoM  |  PRd  |  WiL
 0      13 K        19 K     0       0      220 K    84     588  
 1       0        3024       0       0        0       0     264  
-----------------------------------------------------------------------
 *      13 K        22 K     0       0      220 K    84     852  

実際の値はしばらく無視してください。私の値はもっと大きいです。:-)

Process Control Monitor を使用して PCIe ソケットのランタイム帯域幅を計算するにはどうすればよいですか?

なぜソケットが 2 つしかリストされていないのですか?

答え1

からgithub opcm:

socket は、PCIe スロットやデバイスではなく、CPU ソケットを指します。システムには 2 つの CPU ソケットがありますよね? --help 出力には、CPU ソケットごとに帯域幅を出力する -B スイッチが説明されています (部分的な操作に関する注意事項も参照してください)。pci-iio.x は、PCIe デバイスごとの帯域幅を表示する別のユーティリティです。

関連情報