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

Better Performance - Force rviz to run on second GPU or utilize more resources? #1681

Open
rwbot opened this issue Nov 18, 2021 · 1 comment

Comments

@rwbot
Copy link

rwbot commented Nov 18, 2021

I'm viewing multiple layers of dense pointclouds in rviz, and it's lagging with just one layer, and gets worse as more layers are activated. I have two RTX 3080s, and at no point will GPU 1 get utilized, only GPU 0, usually around 50%, while CPU load is rarely more than 20% and RAM goes to 25GB max.

Is there any way to improve performance by forcing rviz to only use a specific graphics card or utilize more resources?

Your environment

  • OS Version: e.g. Ubuntu 20.04
  • CPU: AMD® Ryzen threadripper pro 3995wx 64-cores × 128
  • GPU: 2 x NVIDIA GeForce RTX 3080/PCIe/SSE2
  • RAM: 128GB
  • ROS Distro: [Noetic]
  • RViz, Qt, OGRE, OpenGl version as printed by rviz:
[${node}.VisualizerApp::init]: rviz version 1.14.10
[${node}.VisualizerApp::init]: compiled against Qt version 5.12.8
[${node}.VisualizerApp::init]: compiled against OGRE version 1.9.0 (Ghadamon)
[/rviz_1637200062035959003.RenderSystem::forceGlVersion]: Forcing OpenGl version 0.
[/rviz_1637200062035959003.RenderWindow* rviz::RenderSystem::makeRenderWindow]: Stereo is NOT SUPPORTED
[/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGL device: NVIDIA GeForce RTX 3080/PCIe/SSE2
[/rviz_1637200062035959003.RenderSystem::detectGlVersion]: OpenGl version: 4.6 (GLSL 4.6).
@rwbot rwbot changed the title Force rviz to run on second GPU Better Performance - Force rviz to run on second GPU or utilize more resources? Nov 18, 2021
@rhaschke
Copy link
Contributor

Basically, I don't think there is a way to utilize both GPUs. Eventually, you have a single rviz window only.
When you report 20% CPU usage, is that averaged over all 128 threads? I guess a few of them are at 100%?
Essentially, PointCloud messages are processed by a single (non-GUI) thread. Additionally, there is the GUI/main thread doing all rendering and GUI interaction. To improve your situation, you first need to understand where the bottleneck actually is.
What do you exactly mean by PointCloud layers? Do you have various PC displays listening to different topics?

I recently changed the message processing for PointCloud displays (#1635) to use a single message queue and processing thread for all PC displays in order to fix a memory leak. You could try to revert that commit and see whether it improves your situation.

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