# Python Agent Performance

**URL:** <https://discuss.elastic.co/t/python-agent-performance/144382>\
**Category:** APM\
**Created:** [August 14, 2018, 6:10pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382 "2018-08-14T18:10:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reza\_Shalbafzadeh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reza_shalbafzadeh/32/34474_2.png) [@Reza\_Shalbafzadeh](https://discuss.elastic.co/u/Reza_Shalbafzadeh)\
**Post date:** [August 14, 2018, 6:10pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382/1 "2018-08-14T18:10:13Z")

</div>

Greetings

has anybody done any measurement about performance impact of Elastic APM on a django stack ?  
AFAIK ElasticAPM works in a blocking fashion and if a request to APM Servers takes long, django app will be slowed down .  
is there any insight about this case ?  
any help/thought is appreciated

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [August 14, 2018, 6:58pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382/2 "2018-08-14T18:58:14Z")

</div>

Hi Reza

by default, the Python agent sends data to the APM Server using a background thread, so it shouldn't block your main thread and impact the performance of your Django app.

Of course, measuring the performance of your app in as much detail as we do comes with a certain overhead. How much that overhead is exactly is difficult to say, as it depends a bit on your specific use case. But there are quite a few settings that you can play around with to tune performance. You can read more about that in our [docs](https://www.elastic.co/guide/en/apm/agent/python/current/tuning-and-overhead.html).

We're also working on an automated benchmark suite for the agent ([https://github.com/elastic/apm-agent-python-benchmarks](https://github.com/elastic/apm-agent-python-benchmarks)), that's work in progress, though.

---

<div class="post-metadata">

**Author:** ![Reza\_Shalbafzadeh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reza_shalbafzadeh/32/34474_2.png) [@Reza\_Shalbafzadeh](https://discuss.elastic.co/u/Reza_Shalbafzadeh)\
**Post date:** [August 14, 2018, 8:13pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382/3 "2018-08-14T20:13:08Z")

</div>

great , thanks a lot [beniwohli](https://discuss.elastic.co/u/beniwohli)

if you could provide more doc about deploying APM Server in production . like minimum requirements and sample nginx configs that would be great  
thank you very much for your help

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [September 5, 2018, 7:04pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382/5 "2018-09-05T19:04:56Z")

</div>

Sizing APM Server for production workloads depends on a number of factors - see [https://www.elastic.co/guide/en/apm/server/6.4/tune-apm-server.html](https://www.elastic.co/guide/en/apm/server/6.4/tune-apm-server.html) for the most critical tunables. At a minimum, we recommend deploying 2 instances for HA purposes - see [https://www.elastic.co/guide/en/apm/server/6.4/high-availability.html](https://www.elastic.co/guide/en/apm/server/6.4/high-availability.html) for some relevant information. You may also want to subscribe to [this issue](https://github.com/elastic/apm-server/issues/1266) under which this kind of documentation may be added.

---

<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:** [September 26, 2018, 3:05pm UTC](https://discuss.elastic.co/t/python-agent-performance/144382/6 "2018-09-26T15:05:01Z")

</div>

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