Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Who is the fastest redis client in node.js? Bench of node-redis, ioredis, thunk-redis. #12

Closed
zensh opened this issue Nov 13, 2015 · 0 comments

Comments

@zensh
Copy link
Member

zensh commented Nov 13, 2015

script

https://github.com/thunks/thunk-redis/blob/master/benchmark/index.js

version

  1. redis v3.1.999
  2. thunk-redis v1.2.1
  3. node_redis v2.3.0
  4. ioredis v1.10.0

result

Run in my Macbook(2.4GHz, 8GB)

Run the bench in thunks(thunk base):

redis(N):node_redis  OK
redis(T):thunk-redis  OK
redis(I):ioRedis  OK
Bench start:(100000)


PING concurrency(full thread):
redis(N): 1753ms 57045ops/sec 100%
redis(T): 1315ms 76045ops/sec 133.3%
redis(I): 2680ms 37313ops/sec 65.4%

PING concurrency(1000 thread):
redis(N): 1824ms 54824ops/sec 100%
redis(T): 1207ms 82850ops/sec 151.1%
redis(I): 2563ms 39016ops/sec 71.2%

PING sequential 1 by 1:
redis(N): 7335ms 13633ops/sec 100%
redis(T): 9031ms 11072ops/sec 81.2%
redis(I): 8304ms 12042ops/sec 88.3%

SET small string:
redis(N): 2845ms 35149ops/sec 100%
redis(T): 1425ms 70175ops/sec 199.6%
redis(I): 3126ms 31989ops/sec 91.0%

GET small string:
redis(N): 2380ms 42016ops/sec 100%
redis(T): 1432ms 69832ops/sec 166.2%
redis(I): 3137ms 31877ops/sec 75.9%

SET long string:
redis(N): 3578ms 27948ops/sec 100%
redis(T): 2951ms 33886ops/sec 121.2%
redis(I): 4102ms 24378ops/sec 87.2%

GET long string:
redis(N): 3505ms 28530ops/sec 100%
redis(T): 3299ms 30312ops/sec 106.2%
redis(I): 5190ms 19267ops/sec 67.5%

INCR:
redis(N): 2941ms 34002ops/sec 100%
redis(T): 1445ms 69204ops/sec 203.5%
redis(I): 3605ms 27739ops/sec 81.6%

LPUSH:
redis(N): 2582ms 38729ops/sec 100%
redis(T): 1403ms 71275ops/sec 184.0%
redis(I): 3178ms 31466ops/sec 81.2%

LRANGE 100:
redis(N): 15276ms 6546ops/sec 100%
redis(T): 9292ms 10761ops/sec 164.4%
redis(I): 18822ms 5312ops/sec 81.2%

Run the bench in co(promise base):

redis(N):node_redis  OK
redis(T):thunk-redis  OK
redis(I):ioRedis  OK
Bench start:(100000)


PING concurrency(full thread):
redis(N): 3412ms 29308ops/sec 100%
redis(T): 2077ms 48146ops/sec 164.3%
redis(I): 4144ms 24131ops/sec 82.3%

PING concurrency(1000 thread):
redis(N): 1642ms 60901ops/sec 100%
redis(T): 1189ms 84104ops/sec 138.1%
redis(I): 2714ms 36845ops/sec 60.5%

PING sequential 1 by 1:
redis(N): 8449ms 11835ops/sec 100%
redis(T): 10153ms 9849ops/sec 83.2%
redis(I): 7725ms 12944ops/sec 109.4%

SET small string:
redis(N): 3943ms 25361ops/sec 100%
redis(T): 2554ms 39154ops/sec 154.4%
redis(I): 4175ms 23952ops/sec 94.4%

GET small string:
redis(N): 4216ms 23719ops/sec 100%
redis(T): 2173ms 46019ops/sec 194.0%
redis(I): 4569ms 21886ops/sec 92.3%

SET long string:
redis(N): 4779ms 20924ops/sec 100%
redis(T): 4719ms 21190ops/sec 101.3%
redis(I): 5593ms 17879ops/sec 85.4%

GET long string:
redis(N): 5135ms 19474ops/sec 100%
redis(T): 3639ms 27480ops/sec 141.1%
redis(I): 6347ms 15755ops/sec 80.9%

INCR:
redis(N): 4469ms 22376ops/sec 100%
redis(T): 2175ms 45977ops/sec 205.5%
redis(I): 4549ms 21982ops/sec 98.2%

LPUSH:
redis(N): 3491ms 28645ops/sec 100%
redis(T): 2602ms 38431ops/sec 134.2%
redis(I): 4053ms 24673ops/sec 86.1%

LRANGE 100:
redis(N): 17818ms 5612ops/sec 100%
redis(T): 10363ms 9649ops/sec 171.9%
redis(I): 20220ms 4945ops/sec 88.1%
@zensh zensh changed the title Who is fastest? Bench node-redis, ioredis, thunk-redis. Who is the fastest redis client in node.js? Bench of node-redis, ioredis, thunk-redis. Nov 19, 2015
@zensh zensh closed this as completed May 7, 2016
@sam2x sam2x mentioned this issue May 25, 2017
19 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant