How to monitor the memory cost of a query?


(Ankur Lathwal) #1

Our ECE cluster JVM memory gets stacked up almost every day now. Sometimes, I see that the number of requests at a particular time rockets up to 15k (with around 14.5k being indexing requests). But the cluster has also auto-restarted when the total requests were close to 500 (250 search and 250 indexing). I suspect that there is some certain kind of request that is consuming multiple amounts of memory compared to the other requests. To help me narrow down the culprit, can someone suggest a way how I can how much affect one kind of request have one the memory? Or basically, how can I calculate the cost/request?
Suggestions are welcome.


(Alex Piggott) #2

Hi @ankurlathwal

You'll get a better general answer in the Elasticsearch forum, since ECE is mostly neutral to how memory consumption works, aside from providing options to change the YAML settings (or more rarely JVM CLI params) via the UI or API.

You can use options such as those described here: https://www.elastic.co/guide/en/elasticsearch/guide/current/_limiting_memory_usage.html to make searches fail instead of stacking the JVM, and to get some idea what the memory usage of the different elements of the indices.

Alex


(Ankur Lathwal) #3

Hi Alex.
Thanks a for replying. Very useful article. I was trying to update fielddata.cache.size but couldn't update using kibana

"reason": "persistent setting [indices.fielddata.cache.size], not dynamically updateable

Do you have any idea how can I update this setting on the cloud? Is there a way to access the .yaml settings file?


(Alex Piggott) #4

@ankurlathwal - yep .. in the cluster edit page in ECE there is a YAML box for user settings, simply put it in there and re-apply the plan to load new ES containers with those settings

Alex


(Ankur Lathwal) #5

Cool. Actually just found it. Thanks a lot BTW.


(Ankur Lathwal) #6

Okay. Stuck again. I am trying to apply "indices.fielddata.cache.size" setting but looks like it's not allowed.
https://www.elastic.co/guide/en/cloud/saas-release/ec-add-user-settings.html

How do I apply this setting?


(Alex Piggott) #7

@ankurlathwal are you on your own ECE instance (ie private cloud) or ESS (formerly known as Elastic Cloud, ie our SaaS/public cloud)?

If the former, the setting should be allowed, if the latter then you can open a support ticket and request the change be applied for you (ie an admin sanity checks it then applies it)

Alex


(system) #8

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