Skip to content
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

Too high CPU load of udpst in server mode (idle, no test clients) #6

Open
twieskot opened this issue Oct 14, 2022 · 4 comments
Open

Comments

@twieskot
Copy link

twieskot commented Oct 14, 2022

cpu_load

I started udpst with the command line: "udpst -x -a mypassword"

@acmacm
Copy link
Contributor

acmacm commented Oct 14, 2022 via email

@twieskot
Copy link
Author

Hi Thomas, thanks for trying-out our code. One of the early examples for starting udpst in server mode is: $ udpst -a Only service requests that utilize a matching authentication key When you invoke the -a option, you need to supply a string for the key. Try this and see if the results change for the better: $ udpst -x -a key123 let us know what you see, Al From: Thomas Wieskotten @.> Sent: Friday, October 14, 2022 4:28 AM To: BroadbandForum/obudpst @.> Cc: Subscribed @.> Subject: [BroadbandForum/obudpst] Too high CPU load of udpst in server mode (idle, no test clients) (Issue #6) [cpu_load]<https://urldefense.com/v3/https:/user-images.githubusercontent.com/33521600/195799885-94672601-cc18-4378-9d7e-a6f36fbf06ab.jpg;!!BhdT!mgEZqMtVEX1RdNl9nTboEyCiX5MpJsorUQ9pIV-iFgsJXHrahPCB76Ef2qXW8wy5VcGLv5y0fFWRIoa1CAh3ug$> I started udpst with the command line: "udpst -x -a " — Reply to this email directly, view it on GitHub<https://urldefense.com/v3/https:/github.com/BroadbandForum/obudpst/issues/6;!!BhdT!mgEZqMtVEX1RdNl9nTboEyCiX5MpJsorUQ9pIV-iFgsJXHrahPCB76Ef2qXW8wy5VcGLv5y0fFWRIoYyvS5KxQ$>, or unsubscribe<https://urldefense.com/v3/https:/github.com/notifications/unsubscribe-auth/ACILYGHKB74QKA723EQ7OZ3WDEKR3ANCNFSM6AAAAAARFAHYMU;!!BhdT!mgEZqMtVEX1RdNl9nTboEyCiX5MpJsorUQ9pIV-iFgsJXHrahPCB76Ef2qXW8wy5VcGLv5y0fFWRIoatwerX6g$>. You are receiving this because you are subscribed to this thread.Message ID: @.@.***>>

sorry.. of course i have set the key correct (fixed my comment above)

furthermore: even if i start the server without a key, it still consumes too many CPU in idle mode

@lc9892
Copy link

lc9892 commented Oct 14, 2022

Allow me to chime in with a little info...

The utilization level you’re seeing does seem to be more than double what I see on a bare-metal server with 2 instances (see below). However, that may be due to it running within a container or VM – maybe you can clarify.

But in general, it otherwise seems normal given that we are utilizing a single high-frequency timer of 100 us (which is used to regulate sending intervals across all tests). With no tests running, we just process an empty timer interrupt.

At one point we actually had logic that would switch the timer back-and-forth to 100 ms when no tests were running – simply to reduce the idle CPU consumption to near zero. However, in the interest of simplifying the core processing loop and timer operations in general we removed it early on (we were trying to keep the code relatively clean and easily digestible). And since this was only relevant on a server, which should be setup for this primary function anyway, it seemed like a reasonable trade-off. However, it could always be an enhancement request (to restore the previous behavior) if deemed critical.

cpu

@hmh
Copy link

hmh commented Oct 9, 2024

Hmm, udpst servers will quite often be up 24/7/365. Assuming there are enough of them deployed (a safe bet, IMHO), and that many of them idle for a considerable fraction of time (another safe bet, IMHO), to me it looks like stopping that timer would be something worth the effort. An act of kindness to the environment, if nothing else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants