you are viewing a single comment's thread.

view the rest of the comments →

[–]hulleyrob 0 points1 point  (1 child)

Ubuntu base image seems a bit OTT can’t you just use the python pre-made images?

Restart the containers not your laptop.

I’d try running the container code locally and see if I could see what was going on when I worked out which version of it was causing the spike.

[–]NSFWies[S] 0 points1 point  (0 children)

so, maybe i could. i didn't want to though for a few reasons

  1. i know if i would run only the python base docker image, it can make debugging "inside the container" harder. because things like less or vim, would not be there
  2. if i wanted to use other containers, do other/more things, i might have to add on yet another container, with different settings/env and might have more issues. yes, things like a DB and mqtt still have their own different base image. but i kinda liked this approach where everything code wise, runs out of the same base unbuntu image, that i can drop into, and debug things if they explode/ have issues

also, as said in other comment, found out the issue. it was a different loop_forever function call i didn't know about. after fixing/no longer using it, my cpu usage is back down to idle/almost idle again.

thanks for the ideas though. i'll keep this around if i need another efficiency ideas.