Skip to content

Instantly share code, notes, and snippets.

@benhagen
Last active August 29, 2015 14:02
Show Gist options
  • Save benhagen/459b75594f259ad04466 to your computer and use it in GitHub Desktop.
Save benhagen/459b75594f259ad04466 to your computer and use it in GitHub Desktop.
Redis Benchmarks on DigitalOcean

Redis Benchmarks on DigitalOcean

Disclaimer: I am a total Redis newb. I'm sure this could be done better.

TL;DR The 4GB droplet is oddly almost 2x faster than smaller and bigger droplets (which are otherwise pretty consistent).

Some quick benchmarks for running Redis on DigitalOcean. All tests were run on the same "Ubuntu 14.04 x64" provisioned instance resized between the different droplet sizes. The benchmark was run twice (once in the afternoon PST, and once in the morning PST). Benchmark executed as:

> redis-benchmark -q -n 100000

Redis version:

> redis-server -v
Redis server v=2.8.9 sha=00000000:0 malloc=jemalloc-3.2.0 bits=64 build=5f0766c9ce70a961

512MB

PING_INLINE: 27870.68 requests per second
PING_BULK: 29274.01 requests per second
SET: 28256.57 requests per second
GET: 30998.14 requests per second
INCR: 28248.59 requests per second
LPUSH: 31181.79 requests per second
LPOP: 29673.59 requests per second
SADD: 28089.89 requests per second
SPOP: 28910.09 requests per second
LPUSH (needed to benchmark LRANGE): 30656.04 requests per second
LRANGE_100 (first 100 elements): 17274.14 requests per second
LRANGE_300 (first 300 elements): 8811.35 requests per second
LRANGE_500 (first 450 elements): 6808.74 requests per second
LRANGE_600 (first 600 elements): 5577.24 requests per second
MSET (10 keys): 26068.82 requests per second
PING_INLINE: 30395.14 requests per second
PING_BULK: 30030.03 requests per second
SET: 29197.08 requests per second
GET: 29533.37 requests per second
INCR: 30075.19 requests per second
LPUSH: 27739.25 requests per second
LPOP: 26336.58 requests per second
SADD: 31625.55 requests per second
SPOP: 29455.08 requests per second
LPUSH (needed to benchmark LRANGE): 31250.00 requests per second
LRANGE_100 (first 100 elements): 17966.22 requests per second
LRANGE_300 (first 300 elements): 9151.64 requests per second
LRANGE_500 (first 450 elements): 7146.43 requests per second
LRANGE_600 (first 600 elements): 5792.06 requests per second
MSET (10 keys): 25700.33 requests per second

1GB

PING_INLINE: 27495.19 requests per second
PING_BULK: 28776.98 requests per second
SET: 29904.30 requests per second
GET: 28232.64 requests per second
INCR: 31230.48 requests per second
LPUSH: 29036.00 requests per second
LPOP: 31133.25 requests per second
SADD: 29044.44 requests per second
SPOP: 29507.23 requests per second
LPUSH (needed to benchmark LRANGE): 21696.68 requests per second
LRANGE_100 (first 100 elements): 16843.52 requests per second
LRANGE_300 (first 300 elements): 8272.67 requests per second
LRANGE_500 (first 450 elements): 6524.01 requests per second
LRANGE_600 (first 600 elements): 5392.29 requests per second
MSET (10 keys): 26990.55 requests per second
PING_INLINE: 27685.49 requests per second
PING_BULK: 28360.75 requests per second
SET: 24142.93 requests per second
GET: 28918.45 requests per second
INCR: 24594.20 requests per second
LPUSH: 26852.85 requests per second
LPOP: 27502.75 requests per second
SADD: 27533.04 requests per second
SPOP: 28336.64 requests per second
LPUSH (needed to benchmark LRANGE): 28272.55 requests per second
LRANGE_100 (first 100 elements): 16889.04 requests per second
LRANGE_300 (first 300 elements): 8394.90 requests per second
LRANGE_500 (first 450 elements): 6571.17 requests per second
LRANGE_600 (first 600 elements): 5809.22 requests per second
MSET (10 keys): 25246.15 requests per second

4GB

PING_INLINE: 23523.88 requests per second
PING_BULK: 52083.34 requests per second
SET: 42589.44 requests per second
GET: 49776.01 requests per second
INCR: 51813.47 requests per second
LPUSH: 47058.82 requests per second
LPOP: 48875.86 requests per second
SADD: 51440.33 requests per second
SPOP: 52576.24 requests per second
LPUSH (needed to benchmark LRANGE): 52410.90 requests per second
LRANGE_100 (first 100 elements): 32123.36 requests per second
LRANGE_300 (first 300 elements): 15117.16 requests per second
LRANGE_500 (first 450 elements): 11144.54 requests per second
LRANGE_600 (first 600 elements): 8763.47 requests per second
MSET (10 keys): 51519.84 requests per second
PING_INLINE: 51361.07 requests per second
PING_BULK: 52603.89 requests per second
SET: 49925.11 requests per second
GET: 51652.89 requests per second
INCR: 51840.33 requests per second
LPUSH: 50276.52 requests per second
LPOP: 48007.68 requests per second
SADD: 41666.66 requests per second
SPOP: 42158.52 requests per second
LPUSH (needed to benchmark LRANGE): 44267.38 requests per second
LRANGE_100 (first 100 elements): 31289.11 requests per second
LRANGE_300 (first 300 elements): 15048.91 requests per second
LRANGE_500 (first 450 elements): 10410.16 requests per second
LRANGE_600 (first 600 elements): 9130.75 requests per second
MSET (10 keys): 49480.46 requests per second

16GB

PING_INLINE: 18096.27 requests per second
PING_BULK: 41493.77 requests per second
SET: 37721.61 requests per second
GET: 41254.12 requests per second
INCR: 38880.25 requests per second
LPUSH: 24289.53 requests per second
LPOP: 32905.56 requests per second
SADD: 40355.12 requests per second
SPOP: 36429.88 requests per second
LPUSH (needed to benchmark LRANGE): 37735.85 requests per second
LRANGE_100 (first 100 elements): 28360.75 requests per second
LRANGE_300 (first 300 elements): 14240.96 requests per second
LRANGE_500 (first 450 elements): 10896.81 requests per second
LRANGE_600 (first 600 elements): 8330.56 requests per second
MSET (10 keys): 31615.55 requests per second
PING_INLINE: 42625.75 requests per second
PING_BULK: 37965.07 requests per second
SET: 39682.54 requests per second
GET: 51626.23 requests per second
INCR: 51098.62 requests per second
LPUSH: 43917.44 requests per second
LPOP: 42735.04 requests per second
SADD: 42753.31 requests per second
SPOP: 43084.88 requests per second
LPUSH (needed to benchmark LRANGE): 42105.26 requests per second
LRANGE_100 (first 100 elements): 28481.91 requests per second
LRANGE_300 (first 300 elements): 14963.34 requests per second
LRANGE_500 (first 450 elements): 11381.74 requests per second
LRANGE_600 (first 600 elements): 9184.42 requests per second
MSET (10 keys): 36845.98 requests per second
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment