This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Performance Profiler

A performance profiler displays performance data in a timeline. It reports how much time is spent per each frame for updating all aspects of your project: rendering nodes that are in view, updating their states, executing scripts with game logic, calculating physics, etc.

With the profiler, you can:

  • Detect the bottlenecks of your application
  • Check if art assets optimization is required
  • Check if code optimization is required
  • Compare the profiling results before and after the changes

Performance Profiler

Activate Profilers#

To turn the profiler on, click Tools -> Performance Profiler and choose the required profiling mode:

Notice
You can also set a hot key (or a key combination) that will run the profiler in the Hotkeys section of the Settings window. However, you will have to create a custom preset. Then you can press this hot key for several times to cycle through profiling modes.

The following profiling modes are available:

  1. Generic profiler shows only the general statistics block.
  2. Rendering profiler shows the detailed rendering statistics and the timeline chart.
  3. Physics profiler shows the detailed physics-related statistics (within the Physics radius) and the timeline chart.
  4. World Management profiler shows the statistics on the whole loaded world.
  5. Thread profiler shows the statistics on loading threaded resources.

To show profiler statistics in the in-game mode, type the show_profiler 1 command in the console. To disable the profiler in the in-game mode, type show_profiler 0 in the console.

Generic Profiler#

Generic Profiler Enabled
Total Total time in milliseconds taken to both calculate and render the current frame. This is the duration of the main loop in the application execution sequence.
Total = Total CPU + Waiting GPU
Total CPU Total time in milliseconds taken to prepare the current frame (including update, render, and swap).
Total GPU Total time in milliseconds taken to render the current frame on the GPU.
Notice
This counter may not work on some GPUs.
Update Time taken to update application logic. This includes executing all steps in the update() function of the world script. It also includes the update of states of all nodes (for example, update of the skinned animation or of a particle system to spawn new particles).
  • If the Update time is too high, it signals that you need to optimize the application logic executed each frame.
  • You may also need to decrease the number of objects in the world, as updating their states (spawn particles by the particle systems, play skinned mesh animation, etc.) increases the load.
Render CPU Time taken to prepare all data to be rendered in the current frame and feed rendering commands from the CPU to the GPU. If Render CPU time is too high, it signals that art assets may need to be optimized, for example:
  • LOD system should be used;
  • polygon count of models should be reduced.
Waiting GPU Time between completing all calculations on the CPU up to the moment when the GPU has finished rendering the frame. (See the illustration). This counter is useful to analyze the bottleneck in your application's performance.
  • When Waiting GPU time is equal to 0, it signals that scripts take too long to be updated and calculations are too intensive for CPU to perform them fast enough. In this case, your application has a CPU bottleneck. Optimize your update block in the world scripts or reduce the number of objects updated each frame.
  • High Waiting GPU time means one of the following:
    • low framerate signals that there exists a GPU bottleneck. The art content needs to be optimized in this case.
    • consistently high framerate means you have free CPU resources available to process more numbers in the update() of the world script.
Interface Time taken to render all GUI widgets.
Total Physics Time taken to perform all physics calculations.
Waiting Physics Time period during which the physics module waits for the completion of rendering process to return to the Main thread and execute the rest of the physics ticks.
CPU ram free The amount of currently available memory.
CPU ram usage physics The current size of the working set. The working set is the set of memory pages currently visible in physical RAM (check the source).
CPU ram usage committed The total amount of private memory that the memory manager has committed for a running process (check the source).
CPU ram malloc The amount of memory allocated by the UNIGINE custom allocator.
CPU ram static pool The amount of memory allocated in static pools.
CPU ram dynamic pool The amount of memory allocated in dynamic pools. Available on Windows only.
CPU ram instance pool The amount of memory allocated in instance pools.
Frame Allocations The number of allocations made per frame. The UNIGINE allocator allocates memory in pools which allows the allocation to be faster and more efficient.
Live Allocations The current number of allocations made / The maximum number of allocations made during runtime (peak consumption).
GPU vram free The amount of currently available video memory.
GPU vram usage The amount of VRAM used by GPU. This value is provided by a graphics driver.
GPU ram usage The amount of RAM used by GPU. This value is provided by a graphics driver.
GPU alloc The number of allocations made by the engine on GPU.
GPU Frame Allocations The number of video memory allocations made per frame.
GPU Live Allocations The current number of allocations made / The maximum number of allocations made during runtime (peak consumption).

Memory Profiler#

Memory Profiler Enabled

The following statistics are displayed in addition to the generic one:

Notice
The memory statistics provided in this section is available within the Rendering profiler when enabled via the UnigineEditor interface (Tools -> Performance Profiler -> Rendering).
However, you can enable the Memory profiler separately by using the show_profiler_memory 1 console command. In this case, only memory statistics will be displayed.
GPU Allocator small pool size The maximum size of the VRAM pool for small allocations.
GPU Allocator small pool usage Actual usage of the video memory pool for small allocations.
GPU Allocator skinned The amount of video memory allocated for skinned meshes.
GPU Allocator decals The amount of video memory allocated for decals.
RAM ImagePool Memory (RAM) amount currently used for the image pool.
RAM StringPool Memory (RAM) amount currently used for the global string pool that stores duplicate strings. The string pool increases performance, as it stores only one string instead of its several duplicates. However, this pool is cleared only on the engine shutdown, so it is important to keep its size at the adequate level during runtime.
RAM Sounds Memory (RAM) amount currently used for sound samples, in megabytes.
RAM Terrain Memory (RAM) amount currently used for terrain streaming, and the memory limit set for it, in megabytes. The memory limit is the maximum amount of RAM that can be used for terrain streaming.
RAM Animations Memory (RAM) amount currently used for animations (stored in the .anim files).
RAM Meshes Static All Total amount of RAM currently used for streaming static meshes.
Notice
The same static mesh will use more RAM than VRAM, as additional data is generated in RAM to calculate collisions, intersections, spatial trees and so on.
RAM Meshes Static Active Amount of RAM actively used for static meshes rendering.
RAM Meshes Static Cache Amount of RAM used for cached static meshes.
RAM Meshes Skinned All Total amount of RAM currently used for streaming skinned meshes.
RAM Meshes Skinned Active Amount of RAM actively used for skinned meshes rendering.
RAM Meshes Skinned Cache Amount of RAM used for cached skinned meshes.
VRAM Render Buffers Amount of VRAM currently used for rendering buffers (Gbuffer, post-effects, etc.), in megabytes.
VRAM Particles Amount of VRAM currently used for vertices of particle systems, and the maximum amount of VRAM that can be used for them, in megabytes.
VRAM Meshes Static All Total amount of VRAM currently used for streaming static meshes.
VRAM Meshes Static Active Amount of VRAM actively used for static meshes rendering.
VRAM Meshes Static Cache Amount of VRAM used for cached static meshes.
VRAM Meshes Skinned All Total amount of VRAM currently used for skinned meshes.
VRAM Meshes Skinned Active Amount of VRAM actively used for skinned meshes rendering.
VRAM Meshes Skinned Cache Amount of VRAM used for cached skinned meshes.
VRAM Textures All Total amount of VRAM currently used for textures, and the maximum amount of VRAM that can be used for them, in megabytes.
VRAM Textures Active Amount of VRAM actively used for textures rendering.
VRAM Textures Cache Amount of VRAM currently used for textures cache, in megabytes.
VRAM Terrain Cache Amount of VRAM cache currently used for Landscape Terrain tiles, in megabytes.
VRAM Terrain Virtual Texture Amount of VRAM currently used for the Landscape Terrain virtual texture, in megabytes.
VRAM Terrain Detail Textures Amount of VRAM currently used for Landscape Terrain details, in megabytes.
RAM Streaming need Amount of RAM that is currently need to be streamed.
VRAM Streaming need Amount of VRAM that is currently need to be streamed.

Rendering Profiler#

Rendering Profiler Enabled

The following statistics are displayed in addition to the generic and memory statistics:

Notice
When enabled via the UnigineEditor interface (Tools -> Performance Profiler -> Rendering), the profiler additionally provides the memory statistics.
However, if you enable it using the show_profiler_render 1 console command, only statistics provided below will be displayed.
Terrain Reload Tiles Number of Landscape Terrain tiles that are currently awaiting reloading after being modified.
Terrain Reload Bounds Number of events causing reloading of tiles (one bound may cause reloading of multiple tiles).
Dynamic Reflections The number of dynamic reflections drawn per frame. In case of cubemap reflections, if all six faces are updated, six reflections are rendered each frame.
Lights Number of light passes rendered per frame. This means that the counter displays the number of all light sources that are currently seen illuminating something in the viewport. This value also includes additional passes for rendering lights in the reflecting surfaces (if dynamical reflections are used). Plain 2D reflection will multiply the number of rendering passes by two, while cubemap-based reflection with six faces updated each frame will multiply the number of rendering passes by six.
Notice
Each light redraws mesh polygons it illuminates. That is why the higher the number of light sources, the higher the number of polygons the graphics card has to render, and the lower the performance. For example, using two omni lights will as much as double the rendered geometry they shine on.
Shadows Number of shadow passes rendered per frame. Each light requires a shadow pass to calculate the shadows. Again, if there are reflecting surfaces with shadows drawn reflected, this will increase the number of shadow passes.
Decals

Number of decals rendered per frame (in all rendering passes). If a decal has any additional effect (is transparent, emits light, lit by a light source, or has any other visual effect) that involves an additional rendering pass for this decal, this decal will be rendered additionally in every corresponding pass, thus the total number of rendered decals will increase.

Surfaces

Number of surfaces rendered per frame (in all rendering passes). If a surface has any additional effect (is transparent, emits light, lit by a light source, or has any other visual effect) that involves an additional rendering pass for this surface, this surface will be rendered additionally in every corresponding pass, thus the total number of rendered surfaces will increase.

Triangles All Total number of triangles rendered per frame including all polygons that are currently visible in the viewport as well as the ones rendered in the process of shadows rendering.
Triangles Shadows Number of triangles rendered per frame in the process of shadows rendering. Each light source has to redraw the geometry it illuminates, increasing the overall count of rendered triangles. In order to avoid GPU bottleneck, keep the number of dynamic light sources and their radius as low, as possible.
Triangles Viewport Number of triangles rendered per frame. This includes all polygons that are currently visible in the viewport (geometry).
Primitives Number of geometric primitives rendered per frame. This includes points, lines, triangles, and polygons. The visualizer and the profiler itself also add to this counter. The value differs dramatically if tessellation is used. In this case, Triangles reports the number of triangles in the coarse mesh, while Primitives shows statistics on the number of tessellated primitives.
Dips The number of draw calls. The higher the number of identical mesh surfaces with the same material, the more effective the instancing is (enabled by default). This means, the number of draw calls is minimized offloading both the CPU and the GPU.
You can compare the number of surfaces (Surfaces) and the number of DIPs used to render them. For example, if there are 30000 surfaces and 1000 DIPs, it means that 30 instanced surfaces of meshes are rendered per only one draw call (Surfaces/Dips). Thus the instancing provides performance boost.
Materials Number of materials set per frame. (Materials are set in each of the rendering passes.)
Shaders Number of shaders set per frame. (Shaders are set in each of the rendering passes; hence if only one material used, its shader still needs to be set several times. When nothing is visible and the screen is black, even in this case the composite shader is still used.)
Compiled PSO Number of PSOs that are currently compiled.
Loaded PSO Current number of loaded PSOs.
Compiled Shaders Number of shaders that are currently compiled.
Loaded Shaders Number of shaders loaded to RAM.
Notice
Values less then 1 Mb are displayed as 0.

Physics Profiler#

This profiler shows statistics within the Physics radius.

Notice
You can enable this profiler via the UnigineEditor interface (Tools -> Performance Profiler -> Physics) and via the show_profiler_physics 1 console command.

Physics Profiler Enabled

The following statistics are displayed in addition to the generic one:

PIslands Number of physical islands within the physics radius that could be calculated separately. The lower this number, the less efficient multi-threading is.
PBodies Number of bodies within the physics radius.
PJoints Number of joints within the physics radius.
PContacts Total number of contacts within the physics radius; this includes contacts between the bodies (their shapes) and body-mesh contacts.
PCollision Duration of the collision detection phase of physic simulation when collisions between objects are found.
PSimulation Duration of all simulation phases added together.

Watch an overview of the Physics Profiler options in our video tutorial on physics.

World Management Profiler#

This profiler shows statistics on the whole world.

Notice
When in the editor mode, enabling and disabling of the node, body or a joint can increase values of world profiler counters, as a (limited) number of clones are created for undo/redo purposes.

World Management Profiler Enabled
Notice
You can enable this profiler via the UnigineEditor interface (Tools -> Performance Profiler -> World Management) and via the show_profiler_world 1 console command.

The following statistics is displayed in addition to the generic one:

WNodes Total number of nodes in the world (both enabled and disabled).
WBodies Total number of bodies in the world.
WShapes Total number of shapes in the world.
WJoints Total number of joints in the world.
WSpawn Time in milliseconds that the engine spends on generating content in procedural nodes (such as grass, clutters, world layers).

Thread Profiler#

Thread Profiler Enabled
Notice
You can enable this profiler via the UnigineEditor interface (Tools -> Performance Profiler -> Thread) and via the show_profiler_thread 1 console command.

The following statistics are displayed in addition to the generic one:

AsyncQueue Time of asynchronous loading of resources (files/meshes/images/nodes), in milliseconds.
Sound Time of asynchronous loading of sounds, in milliseconds.
PathFind Time of asynchronous pathfinding calculations, in milliseconds.
CPUShaders Threads Number of internal engine threads used for CPU shaders.
Last update: 2024-09-11
Build: ()