Replies: 9 comments 9 replies
-
Do you have any agent is running and sending data to it? It could cost some CPU as some timers are running, but 40% seems not reasonable. |
Beta Was this translation helpful? Give feedback.
-
No I was doing docker compose up and then accessing the dashboard once |
Beta Was this translation helpful? Give feedback.
-
I removed the containers and tried again. I can see heavy CPU usage for a few seconds then it drops to 40%.
I will test on a server, one moment. |
Beta Was this translation helpful? Give feedback.
-
I created a fresh Ubuntu 24.04 instance on Digital Ocean of type: 2vcpu-8gb-amd Setup:
After 60s the CPU usage stabilizes around 16%:
Maybe on my notebook it is more, since I am running without power plugged in, atm. Still, 16% is a lot. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the responses! Before getting involved with a project, I would like to check out the very basics. I will look for something more lightweight for my current use case and will look into Skywalking again at a later point in time. |
Beta Was this translation helpful? Give feedback.
-
This seems a special behavior of docker-compose. I actually saw there is 16%-25% CPU cost of docker stats. When I read metrics from demo of skywalking.a.o, https://demo.skywalking.apache.org/dashboard/SO11Y_OAP/ServiceInstance/ZGVtby1vYXAuc2t5d2Fsa2luZy1zaG93Y2FzZQ==.1/ZGVtby1vYXAuc2t5d2Fsa2luZy1zaG93Y2FzZQ==.1_ZGVtby1vYXAtNmI5YzdkODhkOS1ubnBtOA==/Self-Observability-OAP-Instance It only costs 20%-30% with traffic analysis. I have asked @kezhenxu94 to take a look the profiling. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the profiling! And thanks for the demo link. Maybe I should have tried the demo before trying to install it by myself.
That means probably the actual data processing in demo is negligible, compared to the CPU overhead of the queue. I looked up the code, here: The interesting part is this:
That is a loop scanning through array elements repeatedly. I found that the consumeCycle is probably 20 millis:
Hmm, using a proper concurrent queue would be far less complex and better performing. Unfortunately there is almost no comments about why this was done this way (why 2000?!) Is there some benchmarks about this? |
Beta Was this translation helpful? Give feedback.
-
@wu-sheng: A next improvement step could be: Have a blocking reader thread per partition. |
Beta Was this translation helpful? Give feedback.
-
@wu-sheng I close this discussion since there is a resolution. Thanks for the PR! |
Beta Was this translation helpful? Give feedback.
-
Search before asking
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
With OOTB docker compose OAP hase 30-40% idle CPU consumption
docker compose stats output:
What you expected to happen
CPU% = 0%
How to reproduce
Anything else
Apache Skywalking looks like a very cool project. This was just an OOTB test as new user.
The high CPU and also the high memory usage is an immediate show stopper.
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions