# Flush\_Size & max\_retry\_item count metrics!

**URL:** <https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093>\
**Category:** Logstash\
**Created:** [August 26, 2015, 11:06am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093 "2015-08-26T11:06:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [August 26, 2015, 11:06am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093/1 "2015-08-26T11:06:27Z")

</div>

I see flush\_Size & max\_retry\_item default count as 5000.

**what this 5000 means? 5000 bytes? 5000 log count ?**

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 26, 2015, 11:21am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093/2 "2015-08-26T11:21:19Z")

</div>

Quoting the [`flush_size` documentation](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-flush_size), emphasis mine:

> This setting controls **how many events** will be buffered before sending a batch of events.

The documentation of [`retry_max_items`](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-retry_max_items) isn't quite as explicit, but given the name of the parameter I think it's safe to assume that's it's the number of events there too.

---

<div class="post-metadata">

**Author:** ![lucifer](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lucifer](https://discuss.elastic.co/u/lucifer)\
**Post date:** [February 23, 2016, 6:58am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093/3 "2016-02-23T06:58:15Z")

</div>

flush\_size I understand. I don't exactly get what is idle\_flush\_time. The documentation I have read. But still, it's not very clear.

---

<div class="post-metadata">

**Author:** ![DaanCreemers](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@DaanCreemers](https://discuss.elastic.co/u/DaanCreemers)\
**Post date:** [March 23, 2016, 10:18am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093/4 "2016-03-23T10:18:25Z")

</div>

Hi @lucifer ,  
idle\_flush\_time guarantees that your events from Logstash are sent periodically to Elasticsearch. If the number of events is low in logstash, it might take very long before the flush\_size is reached. This would cause that those events are sent to Elasticsearch (too) late. Using idle\_flush\_time you can set a time since the last flush after which the events are flushed, even if the flush\_size has not been reached. When the flush\_size is reached before the idle\_flush\_time, the events are also flushed to Elasticsearch.

---

<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 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/flush-size-max-retry-item-count-metrics/28093/5 "2017-07-06T05:05:43Z")

</div>


