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

[analytics] Elasticsearch analytics requests don't hit the cache properly #1545

orphaner opened this Issue Oct 8, 2018 · 0 comments


None yet
2 participants

orphaner commented Oct 8, 2018

When browsing the dashboard in the portal, our OPS reported me that it tooks a lot of CPU on the elasticsearch process to execute the requests on a large time frame (90Days for ex.). The setup is a 2 nodes cluster with 8cpu each / 64G with SSD disk attached.
The 16 CPUs are used at 100% for a minute when switching a few time (3 or 4) from 30days to 90days.
There is 400Go of data.

After investigation on the ES cluster, we've been playing around the slowlogs and the executed requests. We figured out that a unitary request is hitting the cache : 2s exec time per shard drop to 1ms when executed multiple times.
BUT: on the aggregation part of the request, there is the use of the extended_bounds option that returns empty buckets with null value for the all time frame. Updating the extended_bounds values cause a missed elasticsearch cache. And this is exactly the behavior of the dashboard: anytime you change something on the timeframe, it changes the values on the extended_bounds part of the request: the cache is never hit !

In this PR I simply remove the extended_bounds part that seems not mandatory for me for the request execution itself. This seems only useful for the treatment of the response on the back (or the front).
With OPS we've tested this PR without any visible change on the dashboard nor exceptions on the portal logs.

see you,

orphaner added a commit to orphaner/gravitee-elasticsearch that referenced this issue Oct 8, 2018

@brasseld brasseld self-assigned this Oct 8, 2018

@brasseld brasseld added this to the 1.20.0 milestone Oct 8, 2018

orphaner added a commit to orphaner/gravitee-elasticsearch that referenced this issue Oct 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment