# Pipeline batch size in logstash

**URL:** <https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154>\
**Category:** Logstash\
**Created:** [May 27, 2016, 11:50am UTC](https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154 "2016-05-27T11:50:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![baneshbanna](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@baneshbanna](https://discuss.elastic.co/u/baneshbanna)\
**Post date:** [May 27, 2016, 11:50am UTC](https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154/1 "2016-05-27T11:50:01Z")

</div>

How to give pipeline batch size when we run logstash as a service.  
When we run as a instance we can give as like -b, --pipeline-batch-size  
But when running as service how to give.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![marke72](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marke72/32/10832_2.png) [@marke72](https://discuss.elastic.co/u/marke72)\
**Post date:** [May 27, 2016, 7:14pm UTC](https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154/2 "2016-05-27T19:14:14Z")

</div>

If you're on Linux and have installed Logstash through a package manager there should be a settings file `/etc/sysconfig/logstash` where you can set the `LS_OPTS` environment variable. In that variable you can use the -b option and put the batch size there. This file is read when running logstash as a service. You can also change the heap size here as well and a few other things.

EDIT: `/etc/sysconfig/logstash` is the location for Red Hat systems. For Debian it's located in `/etc/default/logstash`

---

<div class="post-metadata">

**Author:** ![baneshbanna](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@baneshbanna](https://discuss.elastic.co/u/baneshbanna)\
**Post date:** [May 28, 2016, 5:00am UTC](https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154/3 "2016-05-28T05:00:16Z")

</div>

Thank you very much

---

<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, 4:55am UTC](https://discuss.elastic.co/t/pipeline-batch-size-in-logstash/51154/4 "2017-07-06T04:55:47Z")

</div>


