Forums

High CPU usage

I am writing my first bot for Telegram using Python and something is eating my CPU usage. Yesterday I've got into the tarpit when 2000 were used. So I've upgraded to have 4000 and now I see that it is already used too. Please help me to identify what is using the CPU time.

Are you using Jupyter notebooks? They continue to run, even when you're not viewing them, and when they're idle they "sip" CPU power at a rate of about a second per minute. In the processes table at the bottom of the Consoles page they'll have names like "jupyter", "sudospawner", or "kernel". It can be a bit tricky to spot that they're using up the CPU because they do it by spawning a new process, which uses up about a second, then exits -- the parent process that's doing the spawning doesn't use up much CPU by doing that, and of course the processes that start then stop are very ephemeral, so you will probably not see them.

I was using Jupiter notebook but don't do it anymore and there is no notebook at the moment in my files. Ok, thank you. I'll check tomorrow if it will stop using CPU.