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

Kibana offloads timezone calculations to elasticsearch. #10787

Closed
bobrik opened this issue Mar 17, 2017 · 3 comments
Closed

Kibana offloads timezone calculations to elasticsearch. #10787

bobrik opened this issue Mar 17, 2017 · 3 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available)

Comments

@bobrik
Copy link

bobrik commented Mar 17, 2017

Kibana version: 5.2.2

Elasticsearch version: 5.2.2

Server OS version: Debian Jessie

Browser version: Chrome 57

Browser OS version: macOS 10.12.3

Original install method (e.g. download page, yum, from source, etc.): Image from Docker hub

Description of the problem including expected versus actual behavior:

I have a daily index that is currently (1800UTC) at ~2B documents. I want to open Discover tab in Kibana with 12h, but request times out. It's because Kibana decides that calculating timezones for 1.47B docs should happen before bucket assignment in the following aggregation:

{
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "@timestamp",
        "interval": "10m",
        "time_zone": "America/Los_Angeles",
        "min_doc_count": 1
      }
    }
  }
}

Timings:

  • 6s without aggregation.
  • 60s with aggregation as is.
  • 17s with aggregation without a time zone.

I think it's more reasonable to assume that resulting buckets have much smaller cardinality (less than 1.5B buckets) and it's cheaper to do timezone calculations on them, not on the docs.

Not sure if elasticsearch or kibana should do that.

@Bargs Bargs added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Mar 17, 2017
@dmarkhas
Copy link

I am having the same issue in the Date Histogram aggregation - Kibana decides to push the time_zone setting into the aggregation, with no way to disable it, which more than doubles the query time (and, more often than not, ends up in a timeout).

@Bargs
Copy link
Contributor

Bargs commented Mar 7, 2018

Turns out this might be solvable in ES.

@timroes
Copy link
Contributor

timroes commented May 2, 2018

The problem is, we cannot properly solve this in Kibana and still being correct. If you first aggregate documents into buckets and then shift them for the timezone, documents end up in wrong buckets around the borders of daylight saving times.

So I think there is not much we can do except referencing to that ES ticket and hope for performance improvements there, and alternative #6164 to give the user a possibility to hide the histogram chart in Discover view.

@timroes timroes closed this as completed May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available)
Projects
None yet
Development

No branches or pull requests

4 participants