r.Streaming.StressTest.ExtaIOLatency
r.Streaming.StressTest.ExtaIOLatency
#Overview
name: r.Streaming.StressTest.ExtaIOLatency
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
An extra latency in milliseconds for each stream-in requests when doing the stress test.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Streaming.StressTest.ExtaIOLatency is to simulate additional I/O latency during texture streaming stress tests in Unreal Engine 5. This setting is primarily used for the texture streaming system, which is part of the rendering subsystem.
This setting variable is utilized in the Engine module, specifically within the texture streaming helpers. Based on the callsites, it’s evident that this variable is part of the stress testing functionality for the texture streaming system.
The value of this variable is set as a console variable with a default value of 10 milliseconds. It can be modified at runtime through the console or configuration files.
The associated variable CVarStreamingStressTestExtraIOLatency directly interacts with r.Streaming.StressTest.ExtaIOLatency. They share the same value and purpose.
Developers must be aware that this variable is intended for stress testing and debugging purposes only. It’s marked with ECVF_Cheat flag, indicating that it shouldn’t be used in production builds or normal gameplay scenarios. The extra latency introduced by this variable can significantly impact performance and should only be used when specifically testing the robustness of the texture streaming system under high-latency conditions.
Best practices when using this variable include:
- Only enable it during specific stress testing scenarios.
- Use it in conjunction with other streaming stress test variables for comprehensive testing.
- Monitor performance metrics closely when this variable is active.
- Reset the value to 0 or disable it entirely when not actively testing.
Regarding the associated variable CVarStreamingStressTestExtraIOLatency:
The purpose of CVarStreamingStressTestExtraIOLatency is to provide programmatic access to the r.Streaming.StressTest.ExtaIOLatency setting within the engine’s C++ code. It allows the engine to retrieve and apply the extra I/O latency value during texture streaming operations when stress testing is enabled.
This variable is used within the Engine module, specifically in the texture streaming helpers. It’s accessed in the FRenderAssetStreamingSettings::Update function to set the ExtraIOLatency value when stress testing is active.
The value of CVarStreamingStressTestExtraIOLatency is set automatically based on the r.Streaming.StressTest.ExtaIOLatency console variable. Developers don’t need to set this variable directly; instead, they should modify the console variable.
CVarStreamingStressTestExtraIOLatency interacts directly with the r.Streaming.StressTest.ExtaIOLatency setting and is used to apply the extra latency in the texture streaming system during stress tests.
Developers should be aware that this variable is an implementation detail of the stress testing system and should not be accessed or modified directly in game code. Instead, they should use the r.Streaming.StressTest.ExtaIOLatency console variable to control the behavior.
Best practices for CVarStreamingStressTestExtraIOLatency include:
- Treat it as a read-only variable in game code.
- Use the console variable r.Streaming.StressTest.ExtaIOLatency to modify the behavior instead of accessing this variable directly.
- Be aware of its impact on performance when enabled during stress tests.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:287
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarStreamingStressTestExtraIOLatency(
TEXT("r.Streaming.StressTest.ExtaIOLatency"),
10,
TEXT("An extra latency in milliseconds for each stream-in requests when doing the stress test."),
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingStressTestFramesForFullUpdate(
TEXT("r.Streaming.StressTest.FramesForFullUpdate"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarStreamingStressTestExtraIOLatency
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:286
Scope: file
Source code excerpt:
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingStressTestExtraIOLatency(
TEXT("r.Streaming.StressTest.ExtaIOLatency"),
10,
TEXT("An extra latency in milliseconds for each stream-in requests when doing the stress test."),
ECVF_Cheat);
static TAutoConsoleVariable<int32> CVarStreamingStressTestFramesForFullUpdate(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:353
Scope (from outer to inner):
file
function void FRenderAssetStreamingSettings::Update
Source code excerpt:
DropMips = 2;
// Increase chances of canceling IO while they are not yet completed.
ExtraIOLatency = CVarStreamingStressTestExtraIOLatency.GetValueOnAnyThread();
}
else
#endif
{
bStressTest = false;
FramesForFullUpdate = FMath::Max<int32>(CVarFramesForFullUpdate.GetValueOnAnyThread(), 0);