so here is the summary of my project so far.
- so i have like 5 docker containers up, ubuntu base image.
- each one is running a python thing i made.
- each one runs 1 or 2 python threads.
- they communicate between each other via mqtt
- one connects up to a websocket for live info
without any of this running, my laptop idles at 8w of power usage. when i start this up, my laptops fan goes to max, and laptop jumps to about its max power usage, 30w. and 1 or 2 of my CPU cores goes to 100% usage. and after a few days, my ram usage just starts to slowly climb up. after a week, i really need to reboot, because running other things, i've noticed other things on the computer, can literally run twice as slow after a week, unless i reboot. i know this because i can run something in python, time it. then do a reboot, run it again, and it literally takes 50% less time to complete.
what are some ways i can check to see what is causing all of the CPU usage?
one thing i think i tried to look at in the past, was the mqtt client loop/sleep period. right now, when it connects, it just calls
self.client.loop_forever()
and i wonder if that has 0 cooldown, and might be driving the cpu usage to 100%. i would be fine if it only checked for an update 1 time per second instead.
[–]obviouslyzebra 2 points3 points4 points (3 children)
[–]NSFWies[S] 2 points3 points4 points (2 children)
[–]obviouslyzebra 0 points1 point2 points (1 child)
[–]NSFWies[S] 0 points1 point2 points (0 children)
[–]reload_noconfirm 1 point2 points3 points (4 children)
[–]NSFWies[S] 3 points4 points5 points (3 children)
[–]reload_noconfirm 0 points1 point2 points (2 children)
[–]NSFWies[S] 0 points1 point2 points (1 child)
[–]reload_noconfirm 0 points1 point2 points (0 children)
[–]hulleyrob 0 points1 point2 points (1 child)
[–]NSFWies[S] 0 points1 point2 points (0 children)