Inserting documents are very slow in elastic 6.8.5 server

Hi Team

we are seeing slowness when inserting documents in the elastic server.
we are using 6.8.5 elastic server and using 6.8.5 RestHighLevelClient.

IndexResponse resp = restHighLevelClient.index(indexRequest, RequestOptions.DEFAULT);

Above lines are executing 5-6 seconds and inside that java.util.concurrent.parkNanos method is executing for 4-5 seconds. is there any reason behind this slowness ? We are running 2 threads parallelly to insert the documents. is there a way to debug this issue from elastic side ?

EDIT:
We tried with Restarting elastic VM's & monitored network traffic as well. what we noticed is There is some thing wrong with that index. Suddenly Insertion on that particular index taking too much time. Appreciate any help on identify the reason for this problem.

Are you indexing individual documents or using bulk requests (which are much more efficient)? What is the size of your documents? Are you using nested mappings? What is the hardware specification of your cluster? What type of storage are you using? What is the configuration of your cluster? Is there anything in the logs that indicate long and/or slow GC?

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