Couchnode performance issue

I’ve been testing couchbase using couchnode driver. Got strange results (couchbase is too slow):

Benchmark test at Sat Feb 16 2013 14:31:37 GMT+0400 (MSK):
redis
Number of totaol request: 5000, CONCURRENT users: 50
Time taken for tests: 0.184 seconds
Complete requests: 5000
Failed requests: 0
Requests per second: 27173.91 [#/sec]
Time per request: 1.63 [ms]
Max response time: 10[ms] Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 4942 | 98.84%
5 ~ 10 | 47 | 0.94%
10 ~ 20 | 11 | 0.22%
20 ~ 30 | 0 | 0.00%
30 ~ 40 | 0 | 0.00%
40 ~ 50 | 0 | 0.00%
50 ~ 80 | 0 | 0.00%
80 ~ 100 | 0 | 0.00%
100 ~ 200 | 0 | 0.00%
200 ~ 300 | 0 | 0.00%
300 ~ 500 | 0 | 0.00%
500 ~ 1000 | 0 | 0.00%
1000 ~ 2000 | 0 | 0.00%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

Benchmark test at Sat Feb 16 2013 14:31:45 GMT+0400 (MSK):
couchbase
Number of totaol request: 5000, CONCURRENT users: 50
Time taken for tests: 6.64 seconds
Complete requests: 5000
Failed requests: 0
Requests per second: 753.01 [#/sec]
Time per request: 34.22 [ms]
Max response time: 104[ms]Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 246 | 4.92%
5 ~ 10 | 418 | 8.36%
10 ~ 20 | 800 | 16.00%
20 ~ 30 | 798 | 15.96%
30 ~ 40 | 788 | 15.76%
40 ~ 50 | 742 | 14.84%
50 ~ 80 | 1127 | 22.54%
80 ~ 100 | 77 | 1.54%
100 ~ 200 | 4 | 0.08%
200 ~ 300 | 0 | 0.00%
300 ~ 500 | 0 | 0.00%
500 ~ 1000 | 0 | 0.00%
1000 ~ 2000 | 0 | 0.00%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

Benchmark test at Sat Feb 16 2013 14:31:47 GMT+0400 (MSK):
pg
Number of totaol request: 5000, CONCURRENT users: 50
Time taken for tests: 0.666 seconds
Complete requests: 5000
Failed requests: 0
Requests per second: 7507.51 [#/sec]
Time per request: 3.51 [ms]
Max response time: 15[ms] Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 3379 | 67.58%
5 ~ 10 | 1546 | 30.92%
10 ~ 20 | 75 | 1.50%
20 ~ 30 | 0 | 0.00%
30 ~ 40 | 0 | 0.00%
40 ~ 50 | 0 | 0.00%
50 ~ 80 | 0 | 0.00%
80 ~ 100 | 0 | 0.00%
100 ~ 200 | 0 | 0.00%
200 ~ 300 | 0 | 0.00%
300 ~ 500 | 0 | 0.00%
500 ~ 1000 | 0 | 0.00%
1000 ~ 2000 | 0 | 0.00%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

Benchmark test at Sat Feb 16 2013 14:31:49 GMT+0400 (MSK):
pg.native
Number of totaol request: 5000, CONCURRENT users: 50
Time taken for tests: 0.536 seconds
Complete requests: 5000
Failed requests: 0
Requests per second: 9328.36 [#/sec]
Time per request: 2.77 [ms]
Max response time: 8[ms] Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 4195 | 83.90%
5 ~ 10 | 805 | 16.10%
10 ~ 20 | 0 | 0.00%
20 ~ 30 | 0 | 0.00%
30 ~ 40 | 0 | 0.00%
40 ~ 50 | 0 | 0.00%
50 ~ 80 | 0 | 0.00%
80 ~ 100 | 0 | 0.00%
100 ~ 200 | 0 | 0.00%
200 ~ 300 | 0 | 0.00%
300 ~ 500 | 0 | 0.00%
500 ~ 1000 | 0 | 0.00%
1000 ~ 2000 | 0 | 0.00%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

Is it couchnode or couchbase issue? Or this is usual for standalone couchbase instance?

Just tested on latest MacOS’s couchbase distribution.

benchmark methods are:

benchmarks.push _.extend {}, bm_defaults,
description: ‘redis’
method: (cb) →
redis.get ‘1’, (err, data) →
cb err, JSON.parse data

benchmarks.push _.extend {}, bm_defaults,
description: ‘couchbase’
method: (cb) →
cbcli.get ‘1’, cb

benchmarks.push _.extend {}, bm_defaults,
description: ‘pg’
method: (cb) →
pg.query “SELECT 1”, cb

benchmarks.push _.extend {}, bm_defaults,
description: ‘pg.native’
method: (cb) →
pgn.query “SELECT 1”, cb

Hello,

It is probably a Couchnode issue, when have not yet done benchmarks with this SDK that is still under development.

I have logged a task in the project to allow you to follow this work:
http://www.couchbase.com/issues/browse/JSCBC-17

Regards
Tug

It’s a couchnode issue. We’ve been using couchnode for a while, and we just switched https://github.com/3rd-Eden/node-memcached, as we are not using views for now.
The speed difference is enormous. Our code runs about 8 times faster!

Hello,
We have pushed a new release of the Node driver, that have some improvement:
https://npmjs.org/package/couchbase (0.0.12)

Regards

Sorry, it’s even slower(
I’ll try node-memcached.
If you’d like I can share code for benchmarks.

Benchmark test at Tue Apr 30 2013 21:12:31 GMT+0400 (MSK):
couchbase
Number of totaol request: 5000, CONCURRENT users: 50
Time taken for tests: 74.788 seconds
Complete requests: 5000
Failed requests: 0
Requests per second: 66.86 [#/sec]
Time per request: 383.98 [ms]
Max response time: 1256[ms]Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 0 | 0.00%
5 ~ 10 | 0 | 0.00%
10 ~ 20 | 87 | 1.74%
20 ~ 30 | 76 | 1.52%
30 ~ 40 | 67 | 1.34%
40 ~ 50 | 65 | 1.30%
50 ~ 80 | 212 | 4.24%
80 ~ 100 | 144 | 2.88%
100 ~ 200 | 693 | 13.86%
200 ~ 300 | 687 | 13.74%
300 ~ 500 | 1339 | 26.78%
500 ~ 1000 | 1552 | 31.04%
1000 ~ 2000 | 78 | 1.56%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

Hey printercu,

Are you sure that there are no bottlenecks on your Couchbase server and that your benchmarks are being properly timed? I have tried to reproduce your issues but have unfortunately had no success using node@0.10.4, couchnode@0.0.12 and couchbase@2.0.1.

Thanks, Brett

Hi Brett, hi Tug!

Here i published my benchmark config. I use node-benchmark, just modified it a little to support pre-benchmark async setups.

Check config at the top of script before you start.

I commented out code that runs couchbase benchmark, 'cause it’ve got to slow. Just uncomment it to run.
Also added couchbase benchmark via memcached driver. It seems to be fast enough:

Benchmark test at Sat May 25 2013 01:23:59 GMT+0400 (MSK):
couchbase_memcached
Number of totaol request: 10000, CONCURRENT users: 50
Time taken for tests: 0.984 seconds
Complete requests: 10000
Failed requests: 0
Requests per second: 10162.60 [#/sec]
Time per request: 3.61 [ms]
Max response time: 9[ms] Response time distribute:
Response time | Num | Proportion
0 ~ 5 | 8682 | 86.82%
5 ~ 10 | 1318 | 13.18%
10 ~ 20 | 0 | 0.00%
20 ~ 30 | 0 | 0.00%
30 ~ 40 | 0 | 0.00%
40 ~ 50 | 0 | 0.00%
50 ~ 80 | 0 | 0.00%
80 ~ 100 | 0 | 0.00%
100 ~ 200 | 0 | 0.00%
200 ~ 300 | 0 | 0.00%
300 ~ 500 | 0 | 0.00%
500 ~ 1000 | 0 | 0.00%
1000 ~ 2000 | 0 | 0.00%
2000 ~ 3000 | 0 | 0.00%

3000 | 0 | 0.00%

So I think my couchbase instance is just fine.

Regards,
Max