Elasticsearch slowing down Couchbase set operations (inserts)?

Hello, we are experimenting with Couchbase and ElasticSearch.
I know this may sound strange but when we run them both (on the same machine) we get much slower response times from Couchbase set operations.
If we take down the ElasticSearch process (leaving the XDCR replication as it is configured), we get back the higher performance.

Our set operations do not wait for persistence or replication. They are simple set operations that should go to RAM.
For example, when ES is not running, we are able to insert 8000 docs per sec. in Couchbase.
When we run ES, the same 8000 docs take about 5 sec. to insert to Couchbase.

Is this normal? If so, why does it happen?
Even when we have ES running, the machine has enough RAM, and the Couchbase bucket also have enough RAM allocated.
We are using Couchbase 2.2 and ES 0.90.5

Any help would be appreciated.

1 Answer

« Back to question.

Hi Amit, without looking at resource usage, I have to guess so would be great to share your CPU/IO/MEM usage between the 2 cases - with and without elastic search on the same node.

Without that data here is my best guess: there is contention when multiple processes on the same machine compete for the same resources - writes not only take RAM but also cpu time. Context switching alone may explain this... As mutations happen, XDCR and Elastic search start picking up those changes and will start competing with couchbase and replication. if you have views or things like compaction kicking in during this time, there are even more competition between all these resources.

if you have more data to share from the node between these 2 runs, I can be more precise.
thanks
-cihan