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

reported 100% CPU when running #23

Closed
Banana5kin opened this issue Apr 6, 2024 · 1 comment
Closed

reported 100% CPU when running #23

Banana5kin opened this issue Apr 6, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Banana5kin
Copy link

Banana5kin commented Apr 6, 2024

Hi there,

When I run pytes_serial.py one of the RPI cores is constantly at 100%. It's configured for mysql and mqtt, and I have configured for one or other with no change to cpu usage. The refresh period is set to 600 seconds so it's not like I am trying to hammer the stats.

image

I ran py-spy to monitor the running python code with the results below.

image

Many thanks.

@chinezbrun
Copy link
Owner

chinezbrun commented Apr 7, 2024

while true loop is used in the code and the behaviour is normal and will not affect the overall performance. while loop will use 100% of available idle CPU resources, and will only begin to use less when other CPU intensive processes are started up. anyhow i will try to fix this to do not be reported as 100% .

@chinezbrun chinezbrun changed the title 100% CPU when running reported 100% CPU when running Apr 10, 2024
@chinezbrun chinezbrun self-assigned this Apr 10, 2024
@chinezbrun chinezbrun added the enhancement New feature or request label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants