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

Performance when using time_zone in date_historgram #27449

Closed
orweinberger opened this issue Nov 19, 2017 · 2 comments
Closed

Performance when using time_zone in date_historgram #27449

orweinberger opened this issue Nov 19, 2017 · 2 comments
Assignees

Comments

@orweinberger
Copy link

Running Elasticsearch 5.2.0 on Ubuntu with Kibana, single node, single index of 12m documents (4gb).

I'm experiencing a weird performance issue when using date histograms with the time_zone attribute.

The following query takes about 4 seconds to complete:

POST index-2017.11.16/_search
{
  "size": 500,
  "sort": [
    {
      "@timestamp": {
        "order": "desc",
        "unmapped_type": "boolean"
      }
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "analyze_wildcard": true,
            "query": "*"
          }
        },
        {
          "range": {
            "@timestamp": {
              "gte": 1510783200000,
              "lte": 1510869599999,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "must_not": []
    }
  },
  "_source": {
    "excludes": []
  },
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "@timestamp",
        "interval": "30m",
        "time_zone": "Asia/Amman",
        "min_doc_count": 1
      }
    }
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": []
}

If I remove the time_zone attribute, it takes less than a second. On a different environment which has 8 data nodes and 1.5TB index, the above query takes 7 seconds to complete and about 1 second when removing the time_zone attribute.

@colings86
Copy link
Contributor

@cbuescher any idea why the timezone might be causing this performance degradation?

@jpountz
Copy link
Contributor

jpountz commented Nov 21, 2017

Slow downs when specifying a time zone are to be expected, especially in time zones that implement daylight saving time, as it makes the identification of the right bucket for a given date more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants