-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Relatively) high CPU use #548
Comments
I was just noticing the same thing and came here to investigate what might be going on as well :) |
I think this is because the timeout in the select() calls is too short. If you are comfortable building the source, increasing those should fix it. |
That does it. I changed all assignments of I noticed no perceptable lag, but didn't perform any significant testing. I'd probably want to run a couple of high demand terminal apps, like the notcurses demo since I'm not sure what the impact of changing all of the selects will be. |
@jshort Something to consider! |
@xxxserxxx How has running with 1/10s be for you with that select timeout? Any noticeable regression or concerns? |
No issues at all. I only changed the timeouts in etserver. I've had it running on three servers since Dec 5, and have had a login to each running since Dec 8. I haven't seen any isuses. I'm not playing (console) games on them, or anything, so I doubt I'm stressing ET too much, but regardless, I've encountered no issues with the change, and CPU use is down to mostly invisible. |
I came here to look for this issue.
|
@xxxserxxx do you have a patch for your changes? Better yet, create pull request, to keep this issue from being ignored. |
Yes, please submit a PR! |
etserver
is unexpectedly busy, even when no clients are connected. While the CPU use is not pegging the CPU, the fact that it is often at the top of the process list on a mostly quiescent VPS is curious. What is it doing?Related: #11
The baseline comparison is
mosh
. Mosh is on-demand, so when there are no clients,mosh
server is not running. When a client is connected,mosh
server rarely (if ever) consumes enough CPU to enter the top 20. The only other non-standard services running on this server arewireguard
andsshguard
. There is no graphical environment, so other load is light.In contrast, etserver regularly sits at the top of the CPU usaeage list at around ca 0.7% - 1.0%, over
top
and even thesshguard
. This is with no clients. If a client connects, thenetterminal
is started andetserver
jumps to a consistent 1.0% - 1.3% in addition to 1.0% foretterminal
. With a connection eternalterminal processes consumes between 2-2.5% CPU use when idle.Compared to running a rather busy terminal program,
gotop
with a 500ms refresh inmosh
(same server, different connection),etserver
remains the top process. Applications with high drawing demands --ncurses
, etc -- do not increase either theetserver
oretterminal
loads, so this CPU use appears to be baseline background busywork.In the logs for
etserver
are only the starting and listening messages, until a client connects; after a client connection are a few connection set-upINFO
messages, no errors, and then a series of keep alive messages. The client log (on the server) is even more quiet, with merely a connection message and an "is a good socket" confirmation. The server at-v 9
reports no more information (with no connection) than at verbosity 0: literally, just 4 start-upINFO
messages.The text was updated successfully, but these errors were encountered: