[mosh-users] mosh-server using quite a bit of CPU when idle

Jonathan Thackray jthackray at gmail.com
Tue Apr 24 04:57:04 EDT 2012


Hi Keith et al,

I've got your 1.2 release candidate (actually 1.1.95) compiled on my shell
account. (I wasn't able to do this before now, as I gave up when I had to
get Boost, but now you've removed this dependency; I don't have root access
and the box is running Debian 5.0 so I had to build all dependencies such
as ncurses from scratch first)

Anyway, I can see that the mosh-server process is using quite a bit of
CPU. Overnight, it had used 6 minutes of CPU whilst the connection was
idle, and if I run strace, it seems to be doing a lot of:

clock_gettime(CLOCK_MONOTONIC, {1196802, 87880710}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87899258}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87919744}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87936239}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87952865}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87969366}) = 0
clock_gettime(CLOCK_MONOTONIC, {1196802, 87988610}) = 0

calls. Are these all necessary?

I very much like the Mosh idea. As mentioned in a previous message, it would
be great to integrate with tmux/iTerm2 for scrollback, so that hitting 'page up'
doesn't show a lot of truncated output, but requests a previous page (even if it
was never transmitted by mosh originally). tmux and mosh both have a similar
job to do in managing screen buffers, and iTerm2 provides native widgets from
Mac OS X so I don't have to remember arcane commands and can just hit
page-up. Hope they can all work together in future.

Keep up the good work,
Jon.


More information about the mosh-users mailing list