# Filebeat: logstash.pipelining: how does it work?

**URL:** <https://discuss.elastic.co/t/filebeat-logstash-pipelining-how-does-it-work/95921>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 4, 2017, 4:13pm UTC](https://discuss.elastic.co/t/filebeat-logstash-pipelining-how-does-it-work/95921 "2017-08-04T16:13:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mguiwin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mguiwin/32/6743_2.png) [@mguiwin](https://discuss.elastic.co/u/mguiwin)\
**Post date:** [August 4, 2017, 4:13pm UTC](https://discuss.elastic.co/t/filebeat-logstash-pipelining-how-does-it-work/95921/1 "2017-08-04T16:13:01Z")

</div>

Hello,

The documentation being pretty succinct on the topic of `logstash.pipelining` parameter (_and Google searches often return articles related to LS and ES pipelines_), I'd like to know how these 3 parameters interact together:

- `logstash.pipelining`
- `filebeat.spool_size`
- `logstash.bulk_max_size`

Should one assume that if pipelining is enabled, `filebeat.spool_size` must be equal to `logstash.pipelining` \* `logstash.bulk_max_size`? Or in other words, what would be the size of one pipelined request "chunk" ?

Also, any recommendations for the value of `logstash.pipelining`?

Thanks,  
MG

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 7, 2017, 1:23pm UTC](https://discuss.elastic.co/t/filebeat-logstash-pipelining-how-does-it-work/95921/2 "2017-08-07T13:23:12Z")

</div>

See [this wikipedia article](https://en.wikipedia.org/wiki/Protocol_pipelining) for getting an idea what pipelining is for.

Logstash internally uses some windowing, sarting with 10 events and exponentially growing up to `bulk_max_size`. If pipelining is enabled, the 'windowed' batches will be pipelined.

The `spool_size` (removed in 6.0 beta1) is the maximum number of events pushed to the output on flush. This batch is split into sub-batches of `bulk_max_size`, which are again split according to the current window size. In 6.0 we will remove the spooler, in favour of full asynchronous sends.

I found both, 3 and 5 for pipelining to improve throughput at times. Bigger values don't gain you much of an advantage.

---

<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 4, 2017, 1:23pm UTC](https://discuss.elastic.co/t/filebeat-logstash-pipelining-how-does-it-work/95921/3 "2017-09-04T13:23:15Z")

</div>

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