A newer version of this document is available. Customers should click here to go to the newest version.
Profiling Games built with Unreal Engine* (NEW)
Use this recipe to profile a game built with Unreal Engine. See how you can run Intel® VTune™ Profiler within the Unreal Engine environment to profile your game.
Often, the most important factor that affects the performance of a game is the frame rate. This is the speed with which the GPU renders game graphics. However, the CPU can also impact game performance in several ways:
- Slow transfer of data to the GPU
- Slow or unnecessary operations
- Poor parallelism
Content expert: Jennifer Dimatteo
Here are the hardware and software requirements for this performance recipe.
Application: Unreal Engine 4.25.4. The sample game in this version of Unreal Engine is the Action RPG tutorial.
Tools: Intel® VTune™ Profiler version 2022 - Hotspots Analysis (using User-Mode Sampling)NOTE:
Starting with the 2020 release, Intel® VTune™ Amplifier has been renamed to Intel® VTune™ Profiler.
Most recipes in the Intel® VTune™ Profiler Performance Analysis Cookbook are flexible. You can apply them to different versions of Intel® VTune™ Profiler. In some cases, minor adjustments may be required.
Get the latest version of Intel® VTune™ Profiler:
From the Intel® VTune™ Profiler product page.
Download the latest standalone package from the Intel® oneAPI standalone components page.
CPU/GPU: 11th Generation Intel® Core™ i7-1165G7 CPU @ 2.80GHz with Intel® Iris® Xe MAX Graphics
Operating system: Windows* 11 Enterprise
Build the Game in the Unreal Editor
Open the game in the Unreal editor.
Build the game. Make sure to select the Development Build Configuration and Include Debug Files options.
Configure Intel® VTune™ Profiler and Run Hotspots Analysis
Open Intel® VTune™ Profiler and click New Project on the Welcome screen.
Specify a project name and a location for your project.
- Click Create Project.
- In the Configure Analysis window, set these options:
In the WHERE pane, select Local Host.
In the Application field of the WHAT pane, enter the path to the game executable.
In the Application parameters field, enter -VTune.
- (Optional) If you want to skip profiling the start/loading phase of the game,
- In the WHAT pane, open the Advanced section.
- Under Limit collected data by, set a value in seconds for Time from collection end, sec. This is the duration (in seconds) before the end of the collection for which Intel® VTune™ Profiler should retain the results. The data collected earlier than this time gets discarded.
In the HOW pane, select the Hotspots analysis type and enable user-mode sampling.
Click Start to run the analysis.
When the data collection stops, Intel® VTune™ Profiler finalizes the results. This process may take a few minutes as Intel® VTune™ Profiler finds and resolves debug symbols.
Once results have been finalized, the Summary tab displays information about:
- Elapsed time
- Top hotspots
- Top Unreal Engine tasks
- Additional insights and guidance
Switch to the Bottom-up window to see a list of functions. The default sorting is by descending order of CPU time.
Change the grouping from Function / Call Stack to Task Domain / Task Type / Function / Call Stack to focus on Unreal Engine tasks which were identified by the Intel® VTune™ Profiler Instrumentation and Tracing Technology API (ITT API).
In this example, there is considerable spin time in the Render and Game threads. Also, nearly half of the overall CPU utilization was spent spinning, or waiting for a resource to return.
The CPU utilization histogram (in the Summary tab) tells us something important. Although this game was running over 100 threads, for the majority of the run, this game only utilized a single CPU or was mostly idle.
From here, you can try to identify whether the high amount of spin is affecting performance negatively. You can also examine how to make use of more CPU capability. Generally games are not expected to consume the full amount of hardware resources, but there is room on this system for more parallelism.
For additional insights into hotspots, open the Flame Graph view to see a graphical representation of call stacks from the top down.
Did you find the information on this page useful?