Kibana TSVB performance

I am creating some visualizations with Kibana using the TSVB visualizations and find that the load time for the create page is very slow. During this time period it seems that the kibana instance handling the request is pegging to a 100% cpu. Are there any tunables to improve the performance of Kibana?

Any recommendations in terms of sizing the VM hosting Kibana (CPU and Memory)? It seems that adding more cpus won't help since the process seems constrained to a single cpu.

Thanks

cc @Marius_Dragomir @LeeDr

Thanks
Rashmi

Do you have monitoring enabled for ES and Kibana? Would be interesting to see the charts for that. TSVB also queried all indices by default in older versions of Kibana, so that would be an issue as well. What version are you using?

Hi Marius,

We do have monitoring enabled. If I use chrome dev tools, the page load hangs on the fields?index= consistently for 40-60s. I then adjusted the memory of the vm hosting kibana from 2GiB to 4GiB and that query is taking 20s so there was some large jump in performance based on the vm sizing change. Is that large enough or should the VM be provisioned larger?

Also we are running kibana 7.5.0-1. Which version has the fix for not querying all indexes?

-Alex

The size should be good enough, i'd look more into increasing the CPU and Memory for the ES cluster. Do you also have a large number of fields on your index?

It is my understanding based on chrome dev tools that simply clicking create TSVB it seems it is trying to load all fields across all indexes - fields?index=. According to some of our index patterns we have upwards of 3400+ filebeat fields, 2500+ metricbeat fields and several other index patterns that would have many more fields.

View attached screenshot of issue

Sadly yes. It's a legacy issue due to how TSVB communicates with ES. Other visualizations use the index cache so they don't do this request. There is ongoing work on transitioning TSVB to this, but it will take a while as it's a rather big undertaking.

Got it so this isn't fixed in 7.5 then and not fixed in 7.6 either yet? Compared to another ES+Kibana cluster we don't see this issue but there are less fields in the indexes and less index patterns.

No, it's not gonna be any different. The amount of fields and indices is why this happens only one your one cluster.