# Measuring peak read/write bandwidth across device memory

**URL:** <https://forums.developer.nvidia.com/t/measuring-peak-read-write-bandwidth-across-device-memory/123303>\
**Category:** Nsight Compute\
**Created:** [May 15, 2020, 8:38pm UTC](https://forums.developer.nvidia.com/t/measuring-peak-read-write-bandwidth-across-device-memory/123303 "2020-05-15T20:38:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AKKamath](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@AKKamath](https://forums.developer.nvidia.com/u/AKKamath)\
**Post date:** [May 15, 2020, 8:38pm UTC](https://forums.developer.nvidia.com/t/measuring-peak-read-write-bandwidth-across-device-memory/123303/1 "2020-05-15T20:38:39Z")

</div>

Hi all,

I wanted to measure the peak read/write (load/store) bandwidth separately, across the device memory during my kernel executions. I was wondering whether Nsight had any parameter which could capture that.

If not, is there any other tool I could possibly use to obtain it? I know NVML provided functionality to do that for data across PCIe, but I needed it for GPU memory.

Thanks

---

<div class="post-metadata">

**Author:** ![felix\_dt](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/felix_dt/32/14043_2.png) [@felix\_dt](https://forums.developer.nvidia.com/u/felix_dt)\
**Post date:** [May 19, 2020, 8:52am UTC](https://forums.developer.nvidia.com/t/measuring-peak-read-write-bandwidth-across-device-memory/123303/2 "2020-05-19T08:52:56Z")

</div>

I would suggest to start by collecting the MetricWorkloadAnalysis\* sections, either separately, or together with any other metrics and/or sections you are interested in. This should give you several tables and charts in the UI, when opening as a report.

```
nv-nsight-cu-cli --section "MemoryWorkloadAnalysis.*" (app)

```

If you only want to collect individual metrics, you can start with

```
nv-nsight-cu-cli --metrics dram __bytes_write.sum,dram__ bytes_read.sum,dram __bytes_write.sum.pct_of_peak_sustained_elapsed,dram__ bytes_read.sum.pct_of_peak_sustained_elapsed (app)

```

See [Nsight Compute :: Nsight Compute Documentation](https://docs.nvidia.com/nsight-compute/NsightCompute/index.html#sections-and-rules) for the list of available sections. The current active set is also available via --list-section or in the Sections/Rules Info window in the UI.

See the --query-metrics and --query-metrics-mode command line options in [Nsight Compute CLI :: Nsight Compute Documentation](https://docs.nvidia.com/nsight-compute/NsightComputeCli/index.html#command-line-options-profile) for how to query individual metric names.
