Performance issue at elastic search for actionFuture.actionGet()

Hi,

Below call is taking time (Avg 550 milliseconds) in my Elasticsearch application which leads to performance issue.

ListenableActionFuture actionFuture.actionGet().hasFailures()

Has there any way to optimize this call ?

My Elasticsearch version 2.3.2

Any help is welcome !

Rajib

How did you built actionFuture object?

It is something like below:

BulkRequestBuilder bulkRequest = esClientManager.getEsClient().prepareBulk();

UpdateRequestBuilder updateRequestBuilder= esClientManager.getEsClient()
.prepareUpdate("ABC", "ABC", 123)
.setParent("ABC")
.setDoc(valuesByFieldnames)
.setDocAsUpsert(true);

bulkRequest.add(updateRequestBuilder);

ListenableActionFuture actionFuture = bulkRequest.execute();

When you say "something" it means that it's not exactly that?

I mean how many elements you have in a single bulk operation?
Note that Update are slow in general IMO.

It is the actual code. It is an existing implementation on which i am working. And it is one element in the bulk operation.

I am also wonder why they used bulk operation for single element.

Regards,
Rajib

Agreed. Does not make sense for a single request IMO.

Hi @dadoonet , I will concentrate at making this single operation but even if bulk operation for single element don't you think it is taking too much time ?

Rajib

For a set of pure indexation operation, I'm indexing around 20 documents per second on my laptop (SSD drives). Needless to say that with bulk, I can process 15000 documents per second on the same hardware.

Here it depends on your hardware. The fact that you are doing updates means as well that:

  • You send the update query
  • Elasticsearch does a GET by ID
  • Elasticsearch merges the result with what you sent
  • Elasticsearch index the merged document
  • Elasticsearch sends you the response

Indexing means basically:

  • You send the index query
  • Elasticsearch index the document
  • Elasticsearch sends you the response
2 Likes

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