04. [30p] GPU Monitoring

a. [0p] Clone Repository and Build Project

Clone the repository containing the tasks and change to this lab's task 04. Follow the instructions to install the dependencies and build the project from the README.md.

$ git clone https://github.com/cs-pub-ro/EP-labs.git
$ cd EP-labs/lab_05/task_04

b. [10p] Run Project and Collect Measurements

To run the project, simply run the binary generated by the build step. This will render a scene with a sphere. Follow the instructions in the terminal and progressively increase the number of vertices. Upon exiting the simulation with Esc, two .csv files will be created. You will use these measurements to generate plots.

The simulation runs with FPS unbounded, this means it will use your whole GPU. Careful!

Also pay close attention to your RAM!

Every time you modify the number of vertices, wait at least a couple of seconds so the FPS becomes stable.

Increase vertices until you have less than 10 FPS for good results.

c. [10p] Generate Plot

We want to interpret the results recorded. In order to do this, we need to visually see them in a suggestive way. Plot the results in such a way that they are suggestive and easy to understand.

Recommended way to do the plots would be to follow these specifications:

  • One single plot for all results
  • Left OY axis shows FPS as a continuous variable
  • Right OY axis shows time spent per event in ms
  • OX axis follows the time of the simulation without any time ticks
  • OX axis has ticks showing the number of vertices for each event that happens
  • Every event marked with ticks on the OX axis has one stacked bar chart made of two components:
  • a. a bottom component showing time spent copying buffers
  • b. a top component showing the rest without the time spent on copying buffers

d. [10p] Interpret Results

Explain the results you have plotted. Answer the following questions:

  • Why does the FPS plot look like downwards stairs upon increasing the number of vertices?
  • Why does the FPS decrease more initially and the stabilizes itself at a higher value?
  • What takes more to compute: generating the vertices, or copying them in the VRAM?
  • What is the correlation between the number of vertices and the time to copy the Vertex Buffer?
  • Why is the program less responsive on a lower number of frames?

e. [10p] Bonus Dedicated GPU

Go back to step b. and rerun the binary and make it run on your dedicated GPU. Redo the plot with the new measurements. You do not need to answer the questions again.

If you use Nvidia, you can use prime-run.

https://gist.github.com/abenson/a5264836c4e6bf22c8c8415bb616204a

If you use AMD, you can use the DRI_PRIME=1 environment variable.

ep/labs/05/contents/tasks/ex4.txt ยท Last modified: 2025/02/20 15:04 by cezar.craciunoiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0