joukos / PaperTTY

PaperTTY - Python module to render a TTY or VNC on e-ink
953 stars 105 forks source link

CPU usage #20

Closed klundry closed 6 years ago

klundry commented 6 years ago

What is the expected CPU load on a Pi Zero? I'm seeing constant 50-70% load on my Zero just sitting at a terminal prompt and I'm curious if that is expected for this hardware or something is wonky.

joukos commented 6 years ago

It really shouldn't use much (~1% or so depending on the sleep delay) unless the screen is being refreshed. In that case either the screen buffer content was changed or the cursor moved.

Maybe add a debug print statement to somewhere around https://github.com/joukos/PaperTTY/blob/master/papertty.py#L429 to see if it thinks something changed?

klundry commented 6 years ago

Ah, ok I found the issue. I was checking the cpu load with top and htop on the display itself. Top and htop have so much constantly changing information that it was keeping the cpu load pretty high. When I leave it at a prompt and check top via ssh on another computer it stays around 2-3% for papertty and 5% overall load.

joukos commented 6 years ago

That would explain it :) I'll close this now.