This has already been briefly discussed, but for the record here's my complete
report.

Even idle tmux servers without clients use an unexpected amount of CPU. Start
a tmux, create a few windows inside, leave them idling at the shell, detach.
Leave it overnight and when you come back in the morning, the tmux process has
accumulated a fair bit of CPU time. On slower hardware, even while it appears
to be doing nothing in top, it eats something like 3-5% or more over the long
haul.

ktrace reveals that it's doing a wakeup every half second to stat and probe
each terminal and process group. My opinion is that while the status bar
updates are cool when I'm watching, if there's nobody attached this is wasted
effort.

There are also a huge number of gettimeofday() and clock_gettime() calls each
wakeup. Not sure if this is tmux or libevent, but from the outside it looks
like there are multiple timer systems running without much coordination.

Reply via email to