Skip to content

OpenVSLAM uses too much CPU #73

Answered by ThomasHauth
surfii3z asked this question in Q&A
Discussion options

You must be logged in to vote

One other reason you see a high CPU-usage might be because OpenCV will try to use all available CPUs for processing. Your machine has a lot of CPUs (40) where this parallelization might not be that efficient any more. You can limit OpenCV's parallelism with
this command:
cv::setNumThreads(8)
https://docs.opencv.org/4.5.2/db/de0/group__core__utils.html#gae78625c3c2aa9e0b83ed31b73c6549c0

So OpenCV will just use 8 threads now. This will limit the occupancy of your cores. At the same time you can see if the frame gets slower by this change or not.
And as @ymd-stella proposed, try turning off G2O parallelism as I have seen some bad behavior of this feature before.

Cheers.

Replies: 6 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@surfii3z
Comment options

Comment options

You must be logged in to vote
6 replies
@surfii3z
Comment options

@ymd-stella
Comment options

@ymd-stella
Comment options

@surfii3z
Comment options

@surfii3z
Comment options

Comment options

You must be logged in to vote
1 reply
@surfii3z
Comment options

Comment options

You must be logged in to vote
1 reply
@surfii3z
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ymd-stella
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants