Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastcsearch 7 randomly slow search #41231

Closed
nenad007 opened this Issue Apr 15, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@nenad007
Copy link

commented Apr 15, 2019

Elasticsearch Version: 7.0.0
OpenJDK Runtime Environment (build 1.8.0_201-b09)
Centos 7 Linux 3.10.0-957.5.1.el7.x86_64

After upgrade from Elasticsearch 6.7 to 7.0 it randmly took 500 - 1000 ms to deliver the result instead 9 - 12 ms. This happen mostly during 5 seconds and repeat it around 3 times per minute.
It's a very small dataset of 40K records, that fit completely into the memory.

Steps to reproduce:

PUT dating
{
    "mappings": {
      "profile": {
        "properties": {
          "appid": {
            "type": "text"
          },
        "first_name": {
            "type": "text"
          },
         "country": {
            "type": "text"
          },
           "geo_pt": {
            "type": "geo_point"
          },
          "last_update_dt": {
            "type": "date"
          },
         "member_id": {
            "type": "integer"
          },
           "mstatus": {
            "type": "byte"
          },
          "is_hidden": {
            "type": "byte"
          },
           ...
{
                  "size": 100,
                  "from": 0,
                  "script_fields": {
                    "geo_distance": {
                        "script": {
                            "params": {
                                "lat": xxx,
                                "lon": xxx
                            },
                            "source": "doc[\'geo_pt\'].arcDistance(params.lat, params.lon)"
                        }
                    }
                  },
                  "_source": [
                    "first_name",
                    "last_request_dt",
                    "geo_distance"
                  ],
                  "sort": [
                    { "member_id" : {"order" : "desc"} }
                  ],
                  "query": {
                    "bool": {
                      "filter": [
                        {
                            "term": {
                              "mstatus": 1
                            }
                        },
                        {
                            "terms": {
                              "appid": [ xxx, xxx]
                            }
                        },
                        "term": {
                          "country": "xxx"
                        }
                      ]
                      , "must_not": [
                                {
                                  "term": {
                                    "is_hidden": 1
                                  }
                                }, 
                                {
                                  "term": {
                                    "member_id": xxx
                                  }
                                }
                                ]
                    }                    
                  }
                }
@matriv

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

Could you please provide some more information here?
The sentence "This happen mostly during 5 seconds and repeat it around 3 times per minute." is a bit unclear. Did it happen the first 5 seconds after 7.0.0 was up and running? You continued to fire up this query and with a frequency of ~ 3 times per minute it runs slowly?

Is you cluster fully upgraded to 7.0.0 or there are still nodes running on 6.7?
How much Heap size have you configured for your cluster?
Could you check from the logs if there is something unusual when the query becomes slow?
Could you check if there is GC activity during this period that leads to the slow response?

@matriv

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

I'm closing the issue here and I'd like to ask you to ask this question in the Elasticsearch forums by providing also the additional info that has been requested. If there is an actual issue/bug discovered we can then proceed to open a GitHub issue.
Would be great also, to post here the url of the topic once it's opened in the Elasticsearch forums.

Generally, I'd like to ask you to post these sorts of questions on the Elasticsearch forums. We try to reserve Github for bugs and enhancement requests. Thank you!

@matriv matriv closed this Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.