cerebro icon indicating copy to clipboard operation
cerebro copied to clipboard

REST autocomplete very slow when having a large number of indexes/aliases

Open pp88888 opened this issue 4 years ago • 9 comments

Hello,

I am noticing a case where the autocomplete section of the REST page (where the index / url is entered) it is very slow when accessing a cluster with hundreds of indexes (and even more aliases). It can take several minutes to load and makes the page hard to use.

It would be nice if this were faster, or even disabling autocomplete if the number of results is too large. Thanks!

pp88888 avatar Sep 14 '20 16:09 pp88888

I have also thousand of indices, and is the interface is not responding anymore. it consumes all the cpu usage where I installed the cerberus.

cantipop avatar Sep 30 '20 07:09 cantipop

This happens also for our setup. We have 2k+ indices and 10k+ aliases (each index has in average 5 aliases) and after updating from 0.8.5 to 0.9.2, REST interface is freezing, when we try to write something in path input. LE: It freezes also when we try to write some query parameters (e.g: wait_for_completion).

orinciog avatar Nov 23 '20 14:11 orinciog

@pp88888 @cantipop @orinciog Which browser/version are you using? Did you notice this effect from one version to another? I assume you have no issues with other parts of the app? Also, I imagine there is not a problem fetching the data?(when first opening the REST screen, there is call made to /rest to fetch this info)

lmenezes avatar Dec 29 '20 17:12 lmenezes

@lmenezes I have tested with 2 browsers:

Firefox 84.0.1 Chrome Version 87.0.4280.88 (Official Build) (x86_64)

both in OSX 10.15.7. I see the same behavior, the autocomplete become unresponsive. Other parts of the app are fine. I reviewed in network tools and I see the JSON response for the rest endpoint being served pretty quickly. (it is has 6K+ indices on it).

pp88888 avatar Jan 05 '21 04:01 pp88888

@lmenezes

I'm using two browsers: Firefox 84.0 and Chrome Version 87.0.4280.88 (Official Build) (64-bit) on Ubuntu 18.04.

Both are having same behavior in rest app.

/rest route is served in 600ms with 600KB received. All other parts are ok, for example the biggest timing route is /overview with 4.4MB received in 6 seconds.

I observed this behavior when I updated cerebro docker from 0.8.5 to 0.9.2.

orinciog avatar Jan 05 '21 10:01 orinciog

Did you try v0.9.3? We added a fix for #467. Basically if you have many closed indices the performance gets worse.

moliware avatar Jan 26 '21 07:01 moliware

@moliware Sure, I will test 0.9.3, but I don't have closed indices. All 2K+ indices are open.

orinciog avatar Jan 26 '21 07:01 orinciog

Hello @moliware I'm running 0.9.4 and still experience this -- fwiw our indices are open as well.

tyrantkhan avatar Dec 17 '21 17:12 tyrantkhan

I noticed that the issue is not the REST call, but in the JS responding to the JSON payload. @moliware

tyrantkhan avatar Mar 07 '22 20:03 tyrantkhan