# Grok too slow? \[solved\]

**URL:** <https://discuss.elastic.co/t/grok-too-slow-solved/52348>\
**Category:** Logstash\
**Created:** [June 9, 2016, 3:39pm UTC](https://discuss.elastic.co/t/grok-too-slow-solved/52348 "2016-06-09T15:39:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeC](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@MikeC](https://discuss.elastic.co/u/MikeC)\
**Post date:** [June 9, 2016, 3:39pm UTC](https://discuss.elastic.co/t/grok-too-slow-solved/52348/1 "2016-06-09T15:39:02Z")

</div>

Hi,

There was suggested in [this thread](https://discuss.elastic.co/t/lots-of-beats-input-the-circuit-breaker-has-detected-a-slowdown-or-stall-in-the-pipeline/52310/2?u=mikec) that my grok might cause issues with the performance of my filebeat/logstash/elasticseach setup.

This is my config file

```auto
    // more if [source] checks are here
    // ....
    } else if [source] == "/var/log/upstart/webservices.log" {
        grok {
            match => {
                "message" => ".*Average per file: %{NUMBER:webservice_per_file_ms1:int} ms"
            }
        }
        mutate {
            remove_tag => [
                "beats_input_codec_plain_applied"
            ]
            remove_field => [
                "offset",
                "count",
                "audit_type",
                "message",
                "input_type",
                "beat"
            ]
        }
    }

```

Does anything seem un-optimized ?

---

<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:** [June 10, 2016, 5:48am UTC](https://discuss.elastic.co/t/grok-too-slow-solved/52348/2 "2016-06-10T05:48:56Z")

</div>

No, I don't think there's any significant optimization potential here. Dropping the leading `.*` could help.

---

<div class="post-metadata">

**Author:** ![MikeC](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@MikeC](https://discuss.elastic.co/u/MikeC)\
**Post date:** [June 10, 2016, 9:36am UTC](https://discuss.elastic.co/t/grok-too-slow-solved/52348/3 "2016-06-10T09:36:00Z")

</div>

thanks ! ill remove that

---

<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:53am UTC](https://discuss.elastic.co/t/grok-too-slow-solved/52348/4 "2017-07-06T04:53:41Z")

</div>


