# Logstash CVS filter is too slow

**URL:** <https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671>\
**Category:** Logstash\
**Created:** [February 27, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671 "2017-02-27T17:25:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyres](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@lyres](https://discuss.elastic.co/u/lyres)\
**Post date:** [February 27, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671/1 "2017-02-27T17:25:52Z")

</div>

Hi,  
I'm trying to parse my logs by CVS filter, but this plugin is too slow.  
My restriction is to use only 1 worker, because we cannot use more than 1 CPU for parsing. With 1 worker CVS filter parses about 600 lines per second, while I need about 4,000 lines per second.  
I'm already tested my logstash conf without filter (only input from files and output to elasticsearch) - this configuration performs about 8000 lines per second.  
As a comparison, I wrote simple script in KSH and AWK, that parses my logs and send the results to elasticsearch via its bulk API. My script achieves about 14,000 lines per second!!!!!  
I cannot use my script directly. It cannot care about log-rotation, restart and continue from last place, etc - all the goodies that Logstash file input provides.  
I'm use Logstash 5.2.1 on Linux RedHat  
The questions:

1. What can be done to increase performance of CVS filter, if any?
2. If not, how can I connect my script to output of Logstash file input plugin?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 28, 2017, 2:52am UTC](https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671/2 "2017-02-28T02:52:07Z")

</div>

What version are you on?  
What OS?  
What JVM?  
What does your config look like?  
What does the data look like?

---

<div class="post-metadata">

**Author:** ![lyres](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@lyres](https://discuss.elastic.co/u/lyres)\
**Post date:** [February 28, 2017, 6:20pm UTC](https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671/3 "2017-02-28T18:20:28Z")

</div>

> [@lyres](#):
>
> I'm use Logstash 5.2.1 on Linux RedHat

JAVA 1.8. GC activity was as usual.  
Config: simplest File input, CVS Filter with 15 Fields, Elasticsearch output.  
Data: ASCII Files with about 80,000 lines each. Each line has 15 comma separated text Fields

---

<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:** [March 28, 2017, 6:20pm UTC](https://discuss.elastic.co/t/logstash-cvs-filter-is-too-slow/76671/4 "2017-03-28T18:20:52Z")

</div>

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