@bimlesh_singh What’s the reason for setting a 1GB Java heap size when you have 16GB of RAM?
OpenSearch uses that space for many operations, which also include indexing.
Hi Pablo, Thanks for reply. This is onPrem setup. So there are other services running on same server. Thats why kept memory size to small(1gb) as data size is also small . but when we start using API like- _plugins/_sql to fetch data then Stack overflow error being thrown and OpenSearch service crashes for document size around 300000 documents and takes around 15 seconds to process the below query.
{ “query”:SELECT attributes.Employee Specification.First_Name_New AS COLUMN1 , COUNT(*) AS COUNT FROM 23 WHERE identifier IN (‘391938’,‘112233’) AND (attributes.Employee Specification.ID IS NOT NULL) GROUP BY attributes.Employee Specification.First_Name_New HAVING attributes.Employee Specification.First_Name_New IS NOT NULL ORDER BY COUNT DESC"}
Please suggest if there are any fine-tuning settings needed for such queries
@bimlesh_singh As I mentioned before, Java heap size is used for many ither tasks executed by OpenSearch service. This also includes an index management, queries etc. Try increase the Java heap size.
Do you monitor Java heap size utilization? Do you see any errors or messages regarding Java hep size or garbage collection in OpenSearch logs?