-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oss release 27.0.128 created 2022-12-15-04-15
see CHANGELOG.txt for details Original commit sha: b1b416d169d06d528133f8b3d33e5bc478d981f0 Co-authored-by: Carsten Rohn <[email protected]> Co-authored-by: Daniel Haas <[email protected]> Co-authored-by: Tobias Hammer <[email protected]> Co-authored-by: Bernhard Kisslinger <[email protected]> Co-authored-by: Martin Veith <[email protected]> Co-authored-by: Violin Yanev <[email protected]> Co-authored-by: Jonathan Conrad <[email protected]> Co-authored-by: Mohamed Sharaf-El-Deen <[email protected]> Co-authored-by: Markus Keppler <[email protected]>
- Loading branch information
1 parent
b2f32c3
commit a42c7cf
Showing
35 changed files
with
1,047 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
|
||
ext.globalRepositoryDefinition = { | ||
google() | ||
jcenter() | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
// ------------------------------------------------------------------------- | ||
// Copyright (C) 2022 BMW AG | ||
// ------------------------------------------------------------------------- | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
// ------------------------------------------------------------------------- | ||
|
||
/** | ||
@page Profiling Performance and profiling | ||
|
||
# Overview | ||
|
||
There are multiple ways to find bottlenecks in your assets, your code using Ramses, or Ramses itself. | ||
|
||
# Inspecting the contents of your scene and optimizing it | ||
|
||
The first source of performance problems in a 3D application is usually the content. Having large textures or geometry, | ||
heavy shaders, or simply rendering suboptimally - those are all things that can be easily solved in the content/scene directly | ||
by a skilled technical artist. | ||
|
||
Ramses provides a tool to perform such analysis, called the ramses scene viewer (see its documentation in @ref SceneViewer). | ||
|
||
# Looking at the Ramses periodic performance logs | ||
|
||
A great source of information about what's going on in the Ramses threads (specifically when having network involved) are | ||
the ramses periodic logs (RPER). See below how | ||
to read and use these logs. | ||
|
||
## General periodic logs | ||
|
||
Any Ramses application (regardless if it has a client, a renderer, or both) has a periodic log whichs looks like this: | ||
|
||
20210212-16:33:50.770 | Info | RPER | Version: 27.0.6 Hash:cca2a0b60f Commit:28143 Type:Release Env:(unknown) SyncT:1613144030770ms (dtSteady:2023 - dtSync:2023 -> 0) PUp:31679 RUp:31575 RInit:1 RParallel:1 | ||
20210212-16:33:50.775 | Info | RPER | Connected Participant(s): 00000000-0000-0000-0000-000000000003, 00000000-0000-0000-0000-000000000004, 00000000-0000-0000-0000-000000000002, 00000000-0000-0000-0000-000000000005 | ||
20210212-16:33:50.775 | Info | RPER | Dcsm(7AB1-B4A4D03AA15F) C LP:false LC:false CP[] C[] | ||
|
||
First line: | ||
- Ramses version, commithash, commit no, build type | ||
- RInit: 1 instance of ramses initialized (framework) | ||
- RParallel: 1 instance of ramses running now | ||
|
||
Second line: Participants connected to this instance of ramses | ||
|
||
Third line: Dcsm related stats | ||
|
||
## Client periodic logs | ||
|
||
A Ramses client typically reports logs like this: | ||
|
||
20210212-16:33:50.778 | Info | RPER | Client: 1 scene(s): 123 Subscribed | ||
20210212-16:33:50.778 | Info | RPER | msgIn (0) msgO (0) res+ (27/32/29) res- (0) resNr (218/245/231) resF (0) resFS (0) | ||
20210212-16:33:50.782 | Info | RPER | scene: 123 flush (60/61/60) obj+ (50/75/62) obj- (0) objNr (2670/2720/2695) actG (1560/1671/1615) actGS (30988/33020/32004) actO (1560/1671/1615) actSkp (0) ar# (173/197/185) aras (53460/54325/53892) arms (408272) er# (11) eras (1241) erms (2388) tr# (19/20/19) tras (1099739/1114657/1107198) trms (2097144) | ||
|
||
|
||
The client-side periodic logger collects the stats values (flush, obj+, etc) every second. However the time interval | ||
for logging output is configurable and by default set to 2 seconds. | ||
|
||
The collected values are printed in two fashions depending on the stat value: | ||
- `suX` lists the largest collected values of the last logging period (value1, value2, ..., valueN) | ||
- For all other stats there are typically 3 values printed (min/max/avg): | ||
-* min: the smallest value that was collected since the last log output | ||
-* max: the largest value that was collected since the last log output | ||
-* avg: the average of all collected values since the last log output: ((value1 + value2 + ..valueN) / n) | ||
|
||
If the smallest and the largest value are equal (min == max), only 1 value will be printed: (value) | ||
|
||
Examples: | ||
|
||
- Time interval is set to 4 seconds. The logger collected 4 values: 20, 25, 21, 55; Logs will print: (20/55/30) | ||
- Time interval is set to 2 seconds, the logger collected 2 values: 42, 42; Logs will print (42) | ||
|
||
The logs explained line by line: | ||
|
||
First line: | ||
- Client participant id | ||
- List of scenes owned by the client and their status | ||
|
||
|
||
Second line (General client performance stats): | ||
|
||
- msgIn: Number of messages received | ||
- msgO: Number of message sent | ||
- res+: Client Resources created | ||
- res-: Client Resources destroyed | ||
- resNr: Client Resource Count | ||
- resF: Number of Client Resources loaded from File | ||
- resFS: Size of Client Resources loaded from file | ||
|
||
Third line and over (Scene related stats): | ||
|
||
- scene: scene id | ||
- flush: Number of flushes triggered per second | ||
- obj+: Number of scene objects created (ramses::SceneObject) per second | ||
- obj-: Number of scene objects destroyed (ramses::SceneObject) per second | ||
- objNr: Number of currently existing scene objects (ramses::SceneObject) | ||
- actG: Number of scene actions generated per second | ||
- actGS: Size of scene actions generated per second | ||
- actO: Number of scene actions sent to renderer(s) per second (will be counted for each scene subscriber) | ||
- actSkp: Number of skipped scene actions per second (usually an optimization to avoid empty updates) | ||
- suG: Scene updates generated per second. Number of scene update packages generated for network send (might be more than # of sceneupdates) | ||
- suGS: Scene update generated size per second. Accumulated size of scene update packages generated for network | ||
send | ||
- suX: The size of the largest scene update package within 1 second | ||
- ar#: Number of currently used array resources | ||
- aras: Average size of a single array resource ((totalSize of currently used array resources) / ar#) | ||
- arms: Largest currently used array resource | ||
- er#: Number of currently used Effects | ||
- eras: Average size of a single effect resource ((totalSize of currently used effects) / er#) | ||
- erms: Largest currently used effect resource | ||
- tr#: Number of currently used texture resources | ||
- tras: Average size of a single texture resource ((totalSize of currently used textures) / tr#) | ||
- trms: Largest currently used texture resource | ||
|
||
Caveats: | ||
|
||
Some stats describe changes/deltas to the scene: flush, obj+, obj-, act*, su* - others describe a snapshot of the current scene state: objNr, ar*, er* tr* | ||
Resource stats (ar*,er*, tr*) are only logged if there was a flush during the logging interval | ||
|
||
## Renderer periodic logs | ||
|
||
A Ramses application which also contains a renderer component has periodic logs which look like this: | ||
|
||
20210212-16:33:48.791 | Info | RPER | Renderer: 1 scene(s): 123 Rendered | ||
Avg framerate: 52.63158 FPS [minFrameTime 381us, maxFrameTime 59404us], drawcallsPerFrame 35, numFrames 107, resUploaded 128 (13207530 B) | ||
FB0: 92 | ||
Scene 123: rendered 92, framesFArrived 92, framesFApplied 92, framesFBlocked 0, maxFramesWithNoFApplied 3, maxFramesFBlocked 0, FArrived 1397, FApplied 1397, actions/F (10/215/20.180386), dt/F (1/21295/34.343594), RC+/F (0/28/0.09234073), RC-/F (0/28/0.09520401), RS/F (0/0/0) | ||
Time budgets: sceneResourceUpload 315360000000000us resourceUpload 315360000000000us obRender 315360000000000us | ||
Longest frame(us)[avg]:59190 RendererCommands:749 [387] UpdateClientResources:32 [372] ApplySceneActions:7841 [2781] UpdateSceneResources:159 [114] UpdateEmbeddedCompositingResources:14 [8] UpdateStreamTextures:10 [5] UpdateScenesToBeMapped:13 [8] UpdateResourceCache:1039 [3234] UpdateAnimations:8 [5] UpdateTransformations:290 [138] UpdateDataLinks:44 [26] HandleDisplayEvents:34 [316] DrawScenes:1908 [1393] SwapBuffersNotifyClients:47049 [6854] MaxFramerateSleep:0 [2870] | ||
|
||
Read these logs like this: | ||
|
||
First line: | ||
- Renderer participant id | ||
- List of scenes known to renderer and status | ||
|
||
Second line (General renderer performance stats): | ||
- Number of frames per second | ||
- minimal and maximal frame time within time period | ||
- drawcalls per frame | ||
- Number of frames rendered in time period | ||
- resources uploaded in time period | ||
|
||
Third line and over(scene related stats): | ||
- Scene id | ||
- rendered: Number of frames rendered | ||
- FrameFArrived: Number of frames where flushes arrived | ||
- FramesFApplied: Number of frames where flushes applied | ||
- FrameFBlocked: Number of frames where applying a flush was blocked | ||
- maxFramesWithNoFApplied: How many consecutive frame there was no flush applied | ||
- maxFramesFBlocked: How many consecutive frames flushes were blocked from applying | ||
- FArrived: Number of flushes arrived | ||
- FApplied: Number of flushes applied | ||
- actions/F: number of scene actions per flush | ||
- dt/F: flush latency | ||
- RC+/F RC-/F: Number of client resources added/removed per flush | ||
- RS/F: Number of scene resource actions per flush | ||
- RSUploaded: Size of scene resources uploaded | ||
|
||
Time budgets: Information about how much time per frame an action may take as a maximum, set by application | ||
|
||
Advanced stats: | ||
- Longest Frame: How long did the longest frame take to render alltogether | ||
- Rest: Advanced stats for profiling renderer which need internal understanding of the Ramses renderer. | ||
|
||
|
||
|
||
# Using specialized tools | ||
|
||
If the above methods didn't yield the results you expected, or you still think your application can perform better, | ||
you can also use some of the professional tools for profiling: | ||
|
||
- NVidia NSight - a great tool by NVidia which can analyze any OpenGL-based application. Limitation: requires an NVidia graphics card. | ||
- Standard profilers like the MSVC Profiler or gprof - great for finding CPU bottlenecks or memory attrition issues. | ||
- Android Profiler - a great all-round tool for finding issues, also in native libs such as Ramses. Works only on Android. | ||
|
||
*/ |
Submodule abseil
updated
1339 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,7 @@ | |
# | ||
############################################################################ | ||
|
||
set(CPACK_GENERATOR ${ramses_CPACK_GENERATOR}) | ||
|
||
SET(CPACK_GENERATOR "TGZ") | ||
SET(CPACK_SOURCE_GENERATOR "TGZ") | ||
|
||
IF (NOT DEFINED GIT_COMMIT_COUNT OR NOT DEFINED GIT_COMMIT_HASH) | ||
|
@@ -27,28 +26,15 @@ ENDIF() | |
SET(SCM_VERSION "${GIT_COMMIT_COUNT}-${GIT_COMMIT_HASH}") | ||
|
||
IF("${CPACK_PACKAGE_NAME}" STREQUAL "") | ||
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}") | ||
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}") | ||
ENDIF() | ||
|
||
SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION_STRING}-${SCM_VERSION}") | ||
SET(CPACK_PACKAGE_CONTACT "[email protected]") | ||
SET(CPACK_SOURCE_STRIP_FILES TRUE) | ||
set(CPACK_STRIP_FILES FALSE) | ||
set(CPACK_PACKAGE_VENDOR "ramses") | ||
|
||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A distributed 3D rendering framework for embedded systems") | ||
set(CPACK_PACKAGE_DESCRIPTION "A packaged version of ramses. Generated using CPack.") | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") | ||
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/doc/general/images/ramses_logo_with_alpha2.png") | ||
|
||
if(ramses_CPACK_GENERATOR STREQUAL "DEB") | ||
# Enables CPack to add proper dependency info to the package, see docs for more info | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) | ||
endif() | ||
#SET(CPACK_RPM_COMPONENT_INSTALL 1) | ||
#SET(CPACK_ARCHIVE_COMPONENT_INSTALL 1) | ||
SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION_STRING}-${SCM_VERSION}") | ||
SET(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}") | ||
SET(CPACK_SOURCE_STRIP_FILES TRUE) | ||
SET(CPACK_STRIP_FILES FALSE) | ||
|
||
# Allows providing custom package suffix, use "-<commitsha>" by default | ||
if(RAMSES_CUSTOM_PACKAGE_SUFFIX) | ||
|
@@ -60,4 +46,3 @@ endif() | |
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION_STRING}-${PACKAGE_SUFFIX}") | ||
|
||
INCLUDE(CPack) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
#include <array> | ||
#include <vector> | ||
#include <atomic> | ||
#include <cstddef> | ||
|
||
namespace ramses_internal | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.