MongoDB vs. Couchbase performance on single node

I do POC in the data warehouse for documents, so for evaluation I chose MongoDB and CouchBase.

Environmental Details below

Machine: Centos 6.7, 2 processor cores, MHz processor: 2494.078, RAM: 7 GB (6 GB free)

MongoDB version db v3.2.0 with default configuration

CouchBase Version: 4.1.0-5005 Enterprise Edition (cluster RAM: 3 GB, RAM: 1 GB)

Document Size: 326 B

Below is the result of POC

  + -------------- + ---------------------------------- ----------- + -------------- + -------------- + -------- ------ + -------------- + -------------- + ------------- + ------------- +
 |  Operation |  insert (in 10 batch each bacth is of 100K) |  select query |  select query |  select query |  select query |  select query |  range query |  range query |
 + -------------- + ---------------------------------- ----------- + -------------- + -------------- + -------- ------ + -------------- + -------------- + ------------- + ------------- +
 |  Record Count |  1000K |  0 |  100 |  33k |  140k |  334k |  114k |  460k |
 |  Mongo |  99 sec |  568ms |  792ms |  1500ms |  3800ms |  7800ms |  - |  15387ms |
 |  CouchBase |  370 sec |  8ms |  250ms |  6700ms |  28000ms |  69000ms |  28644ms |  - |
 + -------------- + ---------------------------------- ----------- + -------------- + -------------- + -------- ------ + -------------- + -------------- + ------------- + ------------- +

Client: I used JAVA sdk and spring data.

There is a big difference in the performance of couchbase and mongodb on the same node. Is there any configuration option to increase couchbase performance?

+5
source share
3 answers

The current version of Spring Data MongoDB has appeared. It uses WriteConcern.UNACKNOWLEGED - it is triggered and forgotten. You must enable WriteResultChecking.EXCEPTION or use WriteConcern.ACKNOWLEDGED.

http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo.mongo-3.write-concern

+1
source

What durability parameters do you use? Are you running out of bucket memory? 2 cpus is on the underside for minimum couchbase requirements, if compaction works at the same time as your test, I would expect that to make a difference. This can be disabled in the settings.

Couchbase on one node is not something I have ever done in production, minium 3 nodes, so if you have time increasing your node counter, you might get more significant numbers

0
source

If you have 6 GB of available memory, you may need to increase the amount of memory allocated for your bucket. In MongoDB 3.2, WiredTiger will use 60% of the memory minus 1 GB. For 7 GB, from 2.6 to 3.2 GB (I'm not sure if this is 60% of the available or 60% of the total). Perhaps customize your bucket to fit.

0
source

Source: https://habr.com/ru/post/1240563/


All Articles