From df0724983cf784621cced4e7cf081de0e23e99c7 Mon Sep 17 00:00:00 2001 From: Benjamin Fernandes Date: Tue, 30 Jan 2018 15:35:31 +0100 Subject: [PATCH] Reduce max memory usage of sender queue --- agent/trace-agent.ini | 12 ++++++------ writer/config/payload.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/agent/trace-agent.ini b/agent/trace-agent.ini index e12214ec3..6daaa4b73 100644 --- a/agent/trace-agent.ini +++ b/agent/trace-agent.ini @@ -85,8 +85,8 @@ max_spans_per_payload=1000 flush_period_seconds=5 # Maximum amount of trace data we can have queued up in case we are unable to send them to DD servers. # A value <= 0 disables this limit -# Default: 256MB -queue_max_bytes=268435456 +# Default: 64MB +queue_max_bytes=67108864 ################################################### # Service writer - extracts service info from @@ -101,8 +101,8 @@ flush_period_seconds=5 queue_max_payloads=-1 # Maximum amount of service data we can have queued up in case we are unable to send it to DD servers. # A value <= 0 disables this limit -# Default: 256MB -queue_max_bytes=268435456 +# Default: 64MB +queue_max_bytes=67108864 # Maximum amount of time for which we keep service data enqueued in case we are unable to send it to DD servers. # A value <= 0 disables this limit # Default: -1 @@ -115,5 +115,5 @@ queue_max_age_seconds=-1 [trace.writer.stats] # Maximum amount of stats data we can have queued up in case we are unable to send them to DD servers. # A value <= 0 disables this limit -# Default: 256MB -queue_max_bytes=268435456 +# Default: 64MB +queue_max_bytes=67108864 diff --git a/writer/config/payload.go b/writer/config/payload.go index 15563cc0c..7df901eba 100644 --- a/writer/config/payload.go +++ b/writer/config/payload.go @@ -18,8 +18,8 @@ type QueuablePayloadSenderConf struct { func DefaultQueuablePayloadSenderConf() QueuablePayloadSenderConf { return QueuablePayloadSenderConf{ MaxAge: 20 * time.Minute, - MaxQueuedBytes: 256 * 1024 * 1024, // 256 MB - MaxQueuedPayloads: -1, // Unlimited + MaxQueuedBytes: 64 * 1024 * 1024, // 64 MB + MaxQueuedPayloads: -1, // Unlimited ExponentialBackoff: backoff.DefaultExponentialConfig(), } }