DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
583 stars 290 forks source link

MpscBlockingConsumerArrayQueue high memory usage #6380

Open think2077 opened 10 months ago

think2077 commented 10 months ago

In certain scenarios, it has been observed that enabling the trace feature results in higher memory consumption. We simulated situations involving high concurrency and a substantial number of spans within the trace. It was found that MpscBlockingConsumerArrayQueue tends to occupy a comparatively higher amount of old generation memory.

possible that the rate of span generation exceeds the rate of span send? Is there any configuration to limit the size of MpscBlockingConsumerArrayQueue or optimize the sending rate?

Here are some screenshots for reference: Memory usage below 100 MB when not enable trace. image

image image

vamsikrishnachada commented 9 months ago

Facing the same issue. Does setting this configuration dd.trace.partial.flush.min.spans to a lower value help .