Design a write performance test for elasticsearch

I am trying to evaluate elasticsearch for our projects.

The first step is to see if elasticsearch is fit for our write situation.

Here is my plan to test. Please give some advice if there are any problems.

First I have one node elasticsearch. I wrote 10,000 docs into the elasticsearch.
This will cost me 3 seconds.

Then I add another node(with the same cpu/mem/disk resources) into the cluster and wrote 20,000 docs.

I was expecting that this will also cost 3 seconds.
Because I have twice resources (2 nodes) than before so the I/O performance should be twice also. I think this should be a reasonable expection, please correct me if it is not

But actually, the test result is 6 seconds. It seems double the resource (expend the cluster) is not helping on improving the write performance. Why ? Am I using it in a wrong way?

Did the index you are writing to have a replica shard configured? If so, this helps with reliability and resiliency, but also means both nodes indexing the full data set, resulting in more work needing to be done, which would explain the 6 seconds (both nodes indexing 20000 documents)

If you set replica shards to 0, you should be able to get improved throughput compared to the first test, but data will need to be transferred between the nodes, so network performance could also come into play.

2 Likes

Thanks Christian

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