Setting performance budgets with Performance Advisor

As they have different performance expectations, it’s a good idea to set your own performance budgets based on the expected GPU performance of the target device. If you know the top frequency for the GPU in the device, and you have a target frame rate, you can calculate the absolute limit of GPU cost per frame: 

GPU top frequency/Frame rate = Maximum GPU cycles per frame 

For example, if the device has a GPU with a top frequency of 940MHz, and we want to achieve a minimum frame rate of 30FPS, we can assume that the device can handle up to 31 million GPU cycles per frame, while still achieving a frame rate of 30FPS. 

940M / 30 = 31.3M 

When you generate Performance Advisor reports for this device, you can specify a maximum budget for GPU cycles per frame, by specifying the –gpu-cycles-budget=<value> command-line option to the pa command. This budget is then shown on the GPU cycles per frame chart, making it easy to see which sections of the application are incapable of hitting our target performance. 

Here, we set a budget of 28 million GPU cycles per frame, and you can see that the number of fragment cycles is significantly higher than this, causing the application to be fragment bound

GPU cycles chart with budget in Performance Advisor

All the per-frame charts in a Performance Advisor report can display a budget in this way, so you can set budgets for other useful content metrics, such as allowable overdraw levels, and target visibility rates for primitives. 

Generating a report with per-frame performance budgets

To generate a Performance Advisor report where the charts show your own performance budgets for a device, use the following command-line options when generating the report with the pa command. 

Command-line option

Budget

--bandwidth-budget=<value>

Threshold for read/write bytes.

--cpu-cycles-budget=<value>

Threshold for CPU cycles.

--draw-calls-budget=<value>

Threshold for draw calls.

--gpu-cycles-budget=<value>

Threshold for GPU cycles.

--overdraw-budget=<value>

Threshold for overdraw.

--pixels-budget=<value>

Threshold for pixels.

--primitives-budget=<value>

Threshold for primitives.

--shader-cycles-budget=<value>

Threshold for shader cycles.

--vertices-budget=<value>

Threshold for vertices.

For example: 

pa mycapture.apc –gpu-cycles-budget=28000000 

To make it easy to pass in several budgets, you can create a file containing your budget options, and pass this directly to the pa command when generating the report. Refer to the user guide for detailed instructions.