Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note for the release CARLA 0.10.0 #8481

Open
Blyron opened this issue Dec 17, 2024 · 2 comments
Open

Note for the release CARLA 0.10.0 #8481

Blyron opened this issue Dec 17, 2024 · 2 comments

Comments

@Blyron
Copy link
Contributor

Blyron commented Dec 17, 2024

Note for the release CARLA 0.10.0

We’ve conducted several profiling sessions on different PCs in the Package. As of today, the CPU seems to be the main bottleneck; the better the CPU, the better the results. The best we’ve achieved so far is 24/25 FPS (on Ubuntu 22) by adding the -RenderOffScreen flag to the server, essentially turning off the spectator camera.

image

As of now, we have no idea how to optimize further to reach 30 FPS. While it’s true that the other sensors can reach 30 FPS, the issue lies with the RGB Camera. The section highlighted in red shows the block where the camera sensor is being rendered, and the section in yellow corresponds to the spectator.

Yes, GPU parallelism is enabled
image
and you can see that the two command lists are being executed in parallel.
In Image 3,
image
there are several idle periods we don’t fully understand. In the first block, corresponding to the SceneCaptureComponent2D of the camera, you can see some gaps. We don’t know why they’re so large or what causes them. These gaps don’t occur in the second block, which also corresponds to the camera.

There are some long waits that we believe are due to the RenderThread waiting for the GPU (Image 4).

image

Here’s what we’ve tried so far:

Lowering the spectator quality without affecting the client (this hasn’t worked, and even if it did, the performance gain wouldn’t be sufficient as we’ve tested with spectator rendering completely disabled).
Using SceneCaptureComponent flags to speed up performance (this also didn’t work).

According to Epic Users performance of 5.5 is worse than 5.3 but we need 5.5 as the raytracing in vulkan is supported in this version.

So we are open to suggestions and any contributions community can make.

@ZeKubiki
Copy link

ZeKubiki commented Dec 17, 2024

General suggestions:

Profiling the RenderThread:
    Use Unreal Engine’s GPU Visualizer and RenderDoc for deeper profiling and to identify the specific cause of the large idle periods.

Experimenting with Camera Rendering:
    Test reducing SceneCapture resolution (if you haven't already).
    Consider lowering post-processing quality specifically for RGB Camera.

Thread Optimization:
    Investigate multi-threaded rendering settings in Unreal Engine to improve CPU-GPU synchronization, e.g.:
    -UseMultiThreading -numthreads=8 -r.RHICmdBypass=0 -s.AsyncLoadingThreadEnabled=1 -r.SceneRenderTargetResizeMethod=2

@Blyron
Copy link
Contributor Author

Blyron commented Dec 19, 2024

We are aiming to get 30FPS with Scene capture resolution of 920x780.
Thanks for the ideas! We will play with those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants