dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

MpscBlockingConsumerArrayQueue high memory usage

Open linjun2077 opened this issue 1 year ago • 1 comments

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

linjun2077 avatar Dec 17 '23 13:12 linjun2077

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

vamsikrishnachada avatar Jan 15 '24 20:01 vamsikrishnachada