# Tuning APM setup settings

**URL:** <https://discuss.elastic.co/t/tuning-apm-setup-settings/185242>\
**Category:** APM\
**Tags:** java\
**Created:** [June 11, 2019, 4:22pm UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242 "2019-06-11T16:22:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moixcruz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moixcruz/32/40464_2.png) [@moixcruz](https://discuss.elastic.co/u/moixcruz)\
**Post date:** [June 11, 2019, 4:22pm UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/1 "2019-06-11T16:22:30Z")

</div>

Hi there!  
after a success testing and poc of elastic APM in many components and technologies, we are now testing it integrated with all components and thinking what should be decent settings for agents to have good performance of the apm components but enough data for troubleshooting as well.

Firsts tests seems quite heavy because we generated too much data (several GBs for a couple of hours) when we expected to have 10 at most for a day.

So I will start tuning the agent settings as the defaults seem too much but I'd like to ask to community first what is the configuration you have that is valid to you?

- transaction\_sample\_rate: default is 1.0. I reduced initially to 0.5 because I thought 100% was too much, still should be reduced? 10% even 5% should be significant enough, what you think?

- transaction\_max\_spans

- span\_frames\_min\_duration: default is 5ms I haven't touched it but seems is commented by default so not applying, I'll play around with it

So, any recommendation on good values for performance but keeping a good instrumentation as well?

Thanks!

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [June 11, 2019, 6:37pm UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/2 "2019-06-11T18:37:38Z")

</div>

Which agent are you using? Most of the agents have a dedicated performance tuning documentation page, see for instance the Python agent: [https://www.elastic.co/guide/en/apm/agent/python/current/tuning-and-overhead.html](https://www.elastic.co/guide/en/apm/agent/python/current/tuning-and-overhead.html)

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [June 12, 2019, 6:09am UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/3 "2019-06-12T06:09:36Z")

</div>

Additionally you might want to take a look at the [APM Server Storage Management](https://www.elastic.co/guide/en/apm/server/current/storage-management.html) giving an overview about storage and sizing and how to reduce storage.

---

<div class="post-metadata">

**Author:** ![moixcruz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moixcruz/32/40464_2.png) [@moixcruz](https://discuss.elastic.co/u/moixcruz)\
**Post date:** [June 13, 2019, 11:45am UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/4 "2019-06-13T11:45:38Z")

</div>

ups sorry didn't comment, java for now.  
Thanks I continue reviewing the documentation in detail and trying with different values. My question was very generic just to know if anyone has already tried different values for configuration properties and found a good setting that works on production with high load  
cheers

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [June 13, 2019, 1:09pm UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/5 "2019-06-13T13:09:20Z")

</div>

There's not one size fits all answer for the sampling rate. For "web-scale" applications you might even go for sampling rates \<1%.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 4, 2019, 9:09am UTC](https://discuss.elastic.co/t/tuning-apm-setup-settings/185242/6 "2019-07-04T09:09:22Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
