-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
The KQL autocomplete values can take long time #46054
Comments
Pinging @elastic/kibana-app |
@AlonaNadler by default the value suggestions should never take more than a second to appear because we have a timeout. However there is a setting in kibana.yml for configuring this timeout. When you experienced the slowness, do you know if this timeout had been increased above its default? |
+1 on time values. We are experiencing huge slowdown in queries and high CPU usage of our cluster because suggestions take a long time to get values from cluster (hot+cold with 50TB of data). It also queries for every single character you type in the filter box. 20 searches sent in serial that needs to complete before the final results come back. 100% CPU across all my warm nodes results from that. I'd like to be able to turn off "keystroke by keystroke" suggestion and turn on suggestion. Currently doesn't seem possible. All queries should also be terminated when a user has fully entered when they needed (or save the filter). This is a great feature although it doesn't play well with bug clusters used for time series data. |
We are experiencing the same issue. I will copy and paste by comment from the Elastic dicussion board thread here: https://discuss.elastic.co/t/kql-related-performance-issue/199420
|
Adding another case here. Took a long time (weeks) to diagnose the reason for a slow response - KQL autocomplete was adding >30s to response times in this case. |
Any updates on when the suggest feature will use the "time range" selected instead of the full index scan? |
#48450 went into 7.6 and should resolve this issue |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
The fix provided provided some help about making sure 30 requests doesn't make it to the cluster while a user types. The time range has not been. Turning on the filter suggest value bring our cluster to a crawl for hours since it's trying to hit all our indexes (cold and frozen). |
Thanks for the feeback @smalenfant. |
Any updates on the progress of this issue? |
Still slow in Kibana 7.7. |
We have a bug in 7.x that makes the |
@lukasolson made an interesting suggestion: to use async search to fetch search results progressively. @jimczi does this make sense? |
For testing purposes, I used my large data cluster and replaced the query used to fetch autocomplete, to simply getting the latest 20 documents over a 3 year time range. I used async search, but it takes ~10 seconds until the first result even for this simple query. I'm getting similar results running this query in Dev Tools. How can we improve this? Or this is the performance to be expected?
|
I could see several ways to optimize the query:
|
@weltenwort I posted this query as a part of bench marking different autocomplete query combinations :) |
Yes, AFAIK it would return as soon as the hit count is reached. |
I don't understand why are we discussing how to optimize this query when Kibana 6 just limited the time range and it worked great. That should revert how auto-complete worked before, which would fix most of the issues. Later on, we can discuss if it can be optimized better. |
I've benchmarked the performance of our current I tried out the following configurations:
The data used for these tests is a ~40 million logs data set that was generated into a 7.10 staging cloud instance with default configuration. ResultsTimes are taken from the
So it's evident from this table that:
|
I'm more interested in what are the results when the time range is smaller, like 1h or 1 day. Because currently even if the selected time range is 1h Kibana still queries all the unique terms in the whole cluster, which totally kills the cluster, that's why I'm saying that the time range should be implemented first, and other optimization should be added later. |
I guess that Trello board is internal only? |
@kustodian These are just an artifact of a misconfigured integration. This is still the main issue used to track and discuss. |
Fixed by #100174. |
Currently, KQL autocompletes value suggestions can be slow to appear, especially when there is a lot of data to query to get these possible values. This results in a really slow and frustrating autocomplete.
One of the possible reasons (might be others) for the slowness is that the autocomplete doesn't take into account the time range the users are looking at and suggest all possible values.
Perhaps we can filter the values based on the time range the users are looking at when querying.
@Bargs that was raised as an issue in SIEM and APM in the past, would be good to think how we can improve that in order to keep this implementation consistent in Kibana and not have each solution making their own implementation
@Bargs @TinaHeiligers
The text was updated successfully, but these errors were encountered: