-
Notifications
You must be signed in to change notification settings - Fork 202
CPU Hovers at 20-30% after OpenCensus has been added to a GCP AppEngine Flex service #1099
Comments
Yang, please take a look into this. |
We believe the issue may be with the disruptor framework - can you retry using opencensus-impl-lite and let us know whether that solves the problem? |
As @dinooliva said, could you please change |
Great news. After updating to the *-lite version the issue has been resolved. |
Great! |
@dinooliva @songy23 Is this a known issue with Disruptor? |
I think so, @bogdandrutu said he saw similar issue before on GAE. Disruptor wakes up every 100ns or so and could introduce some overhead. |
Do you know if this has been reported in the Disruptor issue tracker? |
I'm not sure but I haven't seen any related issues yet (https://github.com/LMAX-Exchange/disruptor/issues). |
Reopening, since there is still an issue with opencensus-impl. |
It is a combination of Disruptor + AppEngine that causes this problem. |
I see that we do something special on AppEngine iff the java version is 1.7 |
I saw the increase for a project i'm currently working on as well. This project runs on GKE and uses Java 8, so it seems not only Java 7 is affected. After switching to opencensus-impl-lite as suggested above the CPU load was reduced to a neglible amount on an idle system. |
OpenCensus folks, do you think the suggested configuration to move to 'lite' is a workaround or the solution to the problem? |
@gkohen I've just looked more into the issue and found that the problem is with the sleeping strategy that we use for the Disruptor thread:
I think what we need is to allow users to change the sleeping strategy as well as allow them to configure arguments for the SleepingWaitStrategy |
I just ran into this issue as well, but not using AppEngine. Using VisualVM I saw that the crulpit was the Switching to |
I have implemented opencensus-impl-lite (compared to opencensus-impl 0.13.2) in order to work around this on a CPU-sensitive application. Because of the slight response time penalty I am in favor of adding the ability for an application to set a configurer. I appreciate the complexity in adding runtime configuration. I would be happy with a SPI implementation and will pursue a pull request in that style. EDIT: To clarify, I found CPU use impacted my cloud-hosted application despite the upgraded LMAX package (release 0.12.2). |
I have observed the same behaviour, although not profiled it yet. Having instrumented a simple service the idle CPU usage rises from around 3 millicores to 300 millicores - with opencensus-impl 0.15.0. The undelying OS being RHEL 7 running Kubernetes and Docker. |
to chime in, I've noticed this as well running in GKE, about 25% of our CPU time is spent in SleepingWaitStrategy. |
When running our application using |
@danielnorberg see #1599 for more discussions. @songy23 is making a snapshot release for you to try it out and let us know if the fix helped. |
@steveniemitz see discussion in #1599 as well. |
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
0.12.2
What JVM are you using (
java -version
)?8
What did you do?
If possible, provide a recipe for reproducing the error.
Include OpenCensus library in our build.gradle:
In Spring Boot using GCP AppEngine Flexible, we've defined a class to initialize the stackdriver exporter.
What did you expect to see?
CPU to be close to 0 utilization when no traffic takes place.
What did you see instead?
CPU hovering between 20-30% once OpenCesus has been added to a service
The text was updated successfully, but these errors were encountered: