We have run few simple tests to check if couchbase ops / second meets our requirements using a while loop on a single thread as following cases:
a. get same document (~1.25k ops/sec)
b. set same document (~1k ops/sec)
c. set same document with persist / replicate (at max 300 ops/sec)
bucket.upsert(doc, PersistTo.ONE, ReplicateTo.ONE, 15, TimeUnit.SECONDS)
Java SDK: 2.1.3
Server (4 nodes on VMs): 4 cpu, ~10GB ram, ~20GB storage each
Item Count: 200
Bucket RAM/Quota Usage: 69.1MB/37.3GB
Bucket Data/Disk Usage: 107MB/114MB
We are targeting to manage at least 10K ops/second but it seemed quite far from our expectation.
Q1) Is there some configuration in SDK / couchbase server specified the max throughput and therefor our test a) and test b) are limited under 1.25k?
Q2) Is there another way to improve the performance (i.e.: introduce lots threads to increase throughput)?
Q3) Test c) (save with persistence) actually will have a long pause (5~15 seconds) if same document is saved more than twice. Is this normal? How to predict how long should we put for upsert timeout to ensure the operation can be completed (otherwise we will get timeout exception). And how to improve this ops/second?