# Kibana lens visualization is very slow

**URL:** <https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198>\
**Category:** Kibana\
**Created:** [March 9, 2022, 10:33am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198 "2022-03-09T10:33:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 10:33am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/1 "2022-03-09T10:33:59Z")

</div>

I have a cluster consisting of 1 hot (40 cores, 2 SSDs) and 2 cold nodes. I use a data stream to index a lot of data into 50gb one-shard indices with rollover, ILM, etc. Data is also sorted by @timestamp (asc) -- so I believe I've done everything to optimize Elasticsearch.

Yet when I try to create a visualization in Kibana I end up with requests taking a lot of time. Requesting data for 15 minutes takes a few seconds, for a day -- several minutes, for a week -- couldn't even count.

Could this be a problem with Kibana, perhaps? I don't know how else can I optimize Elastic.

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 11:14am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/2 "2022-03-09T11:14:27Z")

</div>

Most of the properties are mapped like this btw. Should I map them only as text/keyword? Perhads that's the issue?

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd36fb9f38fb2e6fd3860391f257167afa7106de.png)

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [March 9, 2022, 11:25am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/3 "2022-03-09T11:25:18Z")

</div>

Hi @notgurev,

May I ask in which context does the problem shows up: does it happen within a dashboard or within the Lens editor?  
Also what version of the stack do you have?

Since version 7.17 the ability to hide suggestions has been introduced, which should improve performances within the Lens editor.

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 11:33am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/4 "2022-03-09T11:33:15Z")

</div>

It happens within the Lens editor. Example:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/7/07a63cc8fad526f3ba104dc9ae66aa879a4b853a.png)

Despite visualizing data for just 1 hour, it takes a lot of time to visualize =(

Elasticsearch 7.14.1 + Kibana 7.14.2

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [March 9, 2022, 11:49am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/5 "2022-03-09T11:49:27Z")

</div>

That would likely be the suggestions system.  
After 7.17 several improvements on the performance side have been added to the Lens editor.

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 11:58am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/6 "2022-03-09T11:58:39Z")

</div>

Which parameters do you mean by "suggestions system"? I found those:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a139d373e71cb064b9268e8a1e96b4117e225b9a.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/9/c93b2723b8db33c390c57963620c48b3c270ec92.jpeg)

What should I change here?

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 12:57pm UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/7 "2022-03-09T12:57:05Z")

</div>

@Marco_Liberati or are you saying that it can only be disabled on 7.17 while I'm on 7.14?

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 9, 2022, 1:12pm UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/8 "2022-03-09T13:12:15Z")

</div>

Sorry, just noticed that this ability is since 1.17. I guess I'll risk updating

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [March 9, 2022, 1:14pm UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/9 "2022-03-09T13:14:34Z")

</div>

In Lens there's a suggestion system enabled by default until 7.17:

 ![Screenshot 2022-03-09 at 14.10.59](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4ccc411fb909c2f9c3dc63cb4f42f96dc1a8b6d5.png)

Because suggestions are always rendered quite often on changes made in the configuration, this can take up some time especially for `Over Time` suggestion. In recent releases some performance tuning have been introduced in order to discard the `Over time` suggestion in some heavy scenarios, or disable altogether the suggestions system:

 ![Screenshot 2022-03-09 at 14.11.08](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9a924e96b9b064cd85bbbf119b92c0dbb3d7e49.png)

In 7.14 the only option I think you may have is for metric columns with `formula` to use them and enable the fullscreen in formula: this is the only case when suggestions are disabled in older versions.

---

<div class="post-metadata">

**Author:** ![notgurev](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@notgurev](https://discuss.elastic.co/u/notgurev)\
**Post date:** [March 15, 2022, 9:12am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/10 "2022-03-15T09:12:45Z")

</div>

> [@Marco\_Liberati](#):
>
> Because suggestions are always rendered quite often on changes made in the configuration, this can take up some time especially for `Over Time` suggestion.

Do I understand correctly that this is an issue with Kibana's performance, and not Elasticsearch? Does Kibana send more requests because of suggestions or just takes more time to calculate something?

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [March 16, 2022, 9:45am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/11 "2022-03-16T09:45:25Z")

</div>

> [@notgurev](#):
>
> Do I understand correctly that this is an issue with Kibana's performance, and not Elasticsearch?

You can test this via opening the Inspector panel for a Lens panel in a dashboard, copy the request sent to ES and check in the DevTools the response time.

> [@](#):
>
> Does Kibana send more requests because of suggestions or just takes more time to calculate something?

This was true in previous version of Kibana prior to 7.17

---

<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:** [April 13, 2022, 9:45am UTC](https://discuss.elastic.co/t/kibana-lens-visualization-is-very-slow/299198/12 "2022-04-13T09:45:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
