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

Reduce cpu usage #45

Open
kkettinger opened this issue Apr 5, 2023 · 5 comments
Open

Reduce cpu usage #45

kkettinger opened this issue Apr 5, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kkettinger
Copy link

kkettinger commented Apr 5, 2023

Hello,

i'm planing on using three webcams on a raspberry pi, but noticed that even when reducing the framerate to "1", the cpu usage is very high (>100%) even for only one webcam.

Is there anyway to reduce the cpu usage? Thanks in advance.

Kevin

@vladimirvivien
Copy link
Owner

@kkettinger CPU usage should not be > 100%.
We did have a memory leak issue in an older version, but that was resolved.

  • Which version of the project are you using?

@kkettinger
Copy link
Author

kkettinger commented Apr 9, 2023

Hello @vladimirvivien,

i'm using go version go1.20.1 linux/arm and the simplecam example (018089c) on a raspberry pi 4. The go.mod uses version v0.0.5.

$ ps -p 2388 -o %cpu,%mem,cmd
%CPU %MEM CMD
 135  0.2 ./simplecam
$ uname -a
Linux rpidev 5.15.84-v7l+ #1613 SMP Thu Jan 5 12:01:26 GMT 2023 armv7l GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

@vladimirvivien
Copy link
Owner

Thans @kkettinger
Apologies for the late reply.
Although I don't have a Pi 4 readily available (price still about $145 to get one 😭 )
I will run on Pi 3 to see if I can reproduce that same behavior.

@kkettinger
Copy link
Author

@vladimirvivien No worries :)
Yes, if i had a spare i could sent it to you, but the one i have is currently in use in a project. It's a bummer that they are so pricey nowadays!

@vladimirvivien
Copy link
Owner

@kkettinger finally has time to resume looking into this (and was able to find a rpi4 this summer).

@vladimirvivien vladimirvivien self-assigned this Nov 24, 2023
@vladimirvivien vladimirvivien added the bug Something isn't working label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants