0

I want to quantitatively measure the memory bandwidth utilization and SM utilization of a CUDA program for performance analysis and regression testing.

My approach so far:

  1. Compute the theoretical memory bandwidth:

    BW_theoretical = mem_clock(Hz) * bus_width(bit) / 8 * 2

  2. Inside the program, calculate actual bandwidth as (bytes read + bytes written) / elapsed time.

  3. Use NVIDIA’s monitoring tool DCGM externally to observe memory bandwidth and utilization during the same program run, then compare the two results.

  4. I expect the [bandwidth from program / BW_theoretical] should near to the DCGM_FI_PROF_DRAM_ACTIVE form dcgm.

Problem

I am using the DCGM metric DCGM_FI_PROF_DRAM_ACTIVE. But I observe that:

  • The bandwidth measured inside the program (bytes/time) differs a lot from the value reported by DCGM.

My questions

  1. Does DCGM_FI_PROF_DRAM_ACTIVE really represent memory bandwidth utilization? Or does it only indicate the percentage of cycles the DRAM is active (not equivalent to throughput)?

  2. If I want to obtain bytes/sec throughput that can be compared directly with my in-program measurement, which DCGM metrics should I use instead? Or which tools could I used?

1 Answer 1

2

DCGM_FI_PROF_DRAM_ACTIVE is the percentage of cycles the DRAM is active. On GPUs with HBM memory the memory clock does not change dynamically so this should be accurate. On GPUs with GDDR memory the memory clock can dynamically change over time to optimize power and performance.

It is not clear how you are counting bytes/sec in the application and adjusting for memory hierarchy.

Nsight Systems and Nsight Compute can both report on data throughput in order to provide a more detailed baseline. Nsight Compute will report in bytes/sec.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.