-
Notifications
You must be signed in to change notification settings - Fork 6
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
High cpu usage? #3
Comments
The PC I'm running it on is an i5-7500t, I'm showing 0% CPU, it's probably been running for about a day since I restarted it last. (base) raudette@6502:~$ ps -p 2690193 -o %cpu,%mem,cmd I can get it to spike to 0.7% when I'm interacting with it in Discord. I'm connected via USB. I'm currently connected to a Heltec V3 - I just checked, it's running ancient firmware - v2.3.10
|
Hello, This is after around 1 minute:
This is after around 2 minutes: |
I haven't been able to reproduce this issue - I've upgraded the firmware on my device to 2.5.4, I'm connecting by IP, and after 12 hours, I'm still showing 0%, going up to 0.7% when there is activity. I can't think of any other potential meaningful differences that would account for such a large difference in CPU usage, it's a fairly simple script connecting the Discord and Meshtastic libraries. I can't see this making a difference, but I'm running Python 3.11.5 on Ubuntu 24.04. Perhaps if you have another PC available, try running it on another PC, and see if you can reproduce the issue. |
I will run it on OpenSUSE which I have available. I will let you know what the test results are. |
writing from different account. Cannot reproduce it god dammit. On this platform it gets messy:
|
I just took a look at the other major packages - pip show indicates: I can't see the python version being a big deal, but perhaps try an alternate python installation with conda or something similar? |
I recreated the same environment. On my server (high cpu peaks) On my Raspberry (no issues at all) That's interesting. Edit: it's not a critical issue. In my case I moved it to the RPI. Debugging it could be time consuming, so please don't inspect too deeply and waste your time on this :) |
Well.. that's interesting. After couple hours on Raspberry Pi. root 248811 89.3 1.3 505288 51368 pts/3 Sl+ 08:30 214:26 python3 meshtastic_discord_bridge.py CPU again in peak (1 core) |
As best as I can tell, I started the app last on Oct 19th, and it is still sub-1% I have no experience profiling apps - I just read this article: It suggests this tool: https://github.com/plasma-umass/scalene It's a pip package. After installing, you run it as follows: After you notice the issue, hit CTRL-C Scalene then dumps output to the screen, indicating where resources are being spent. Might be worth checking out. |
This one seems to have biggest values. It reached 100% on core. |
On USB all works fine, no high cpu spikes. |
I've just raised the issue on the Meshtastic repo - meshtastic/python#709 |
Hello,
I just noticed one weird thing.
CPU usage reaches 100% for single core (i5 3470T).
The text was updated successfully, but these errors were encountered: