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

Fps lower after adding players #4289

Closed
zjh6252007 opened this issue Jun 8, 2021 · 3 comments
Closed

Fps lower after adding players #4289

zjh6252007 opened this issue Jun 8, 2021 · 3 comments
Assignees
Labels
question stale Issue has not had recent activity

Comments

@zjh6252007
Copy link

zjh6252007 commented Jun 8, 2021

Hello everyone,
Now I'm doing a multiple driving test. I have a computer as server and another three as clients. When I connect with one player, the server fps down from 70 to 30. When I connect with two players, the fps down from 30-20. And with three players, the server fps down to 15. I guess that the increase in RGB cameras has led to a decrease in FPS. Is there any way I can improve the fps?

I'm now using ubuntu 18.04. CARLA 0.9.11

@qhaas
Copy link
Contributor

qhaas commented Jun 9, 2021

According to the carla performance report, adding vehicles does decrease performance significantly. If they are managed by autopilot (traffic manager), performance decreases further, in part because TM appears to be single-threaded (cpu bound).

You can check to see if you are GPU or CPU bound by using nvidia-smi and top to compare GPU vs CPU if you are in no mood to profile the code. If you see the python process pegged at 100% CPU, likely means you have a bottleneck with some feature that is single-threaded.

If you are GPU bound, graphics performance tweaks might help.

If you are CPU bound... enabling hybrid mode can help with physics induced coy bottlenecks, depending on how many NPCs are in the simulation that are not near your players. If you are saving imagery out as PNGs, know libpng is single-threaded, but one can switch to tiff to mitigate.

Also, if you are using synchronous mode with multiple clients, then you might be in uncharted performance territory ;)

UPDATE: Requested some optimizations to TM to reduce CPU related bottlenecks

@liuyandong1988
Copy link

According to the carla performance report, adding vehicles does decrease performance significantly. If they are managed by autopilot (traffic manager), performance decreases further, in part because TM appears to be single-threaded (cpu bound).

You can check to see if you are GPU or CPU bound by using nvidia-smi and top to compare GPU vs CPU if you are in no mood to profile the code. If you see the python process pegged at 100% CPU, likely means you have a bottleneck with some feature that is single-threaded.

If you are GPU bound, graphics performance tweaks might help.

If you are CPU bound... enabling hybrid mode can help with physics induced coy bottlenecks, depending on how many NPCs are in the simulation that are not near your players. If you are saving imagery out as PNGs, know libpng is single-threaded, but one can switch to tiff to mitigate.

Also, if you are using synchronous mode with multiple clients, then you might be in uncharted performance territory ;)

I try the hybrid mode method(fig 1). In the beginning, the fps is almost 10 fps(fig 2). However, the FPS also decreases after some episodes (fig 3). I use the synchronous mode, and server/client fps is 10. I set 50 vehicles and 50 pedestrains in Town02 (Carla 0.9.11). I have to restart my program script. This problem has bothered me for a long time.

Screenshot from 2021-07-21 10-30-15
Screenshot from 2021-07-21 10-31-10
Screenshot from 2021-07-21 10-28-49

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Jan 9, 2022
@stale stale bot closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question stale Issue has not had recent activity
Projects
None yet
Development

No branches or pull requests

5 participants