Git Product home page Git Product logo

Comments (6)

haileys avatar haileys commented on July 28, 2024

Oh, bee tee dubs, those benchmarks are shockingly inaccurate. Here are some real benchmarks:

C Redis:

PING: 47846.89 requests per second
PING (multi bulk): 42372.88 requests per second
SET: 46314.81 requests per second
GET: 45477.27 requests per second
INCR: 43103.45 requests per second
LPUSH: 45054.05 requests per second
LPOP: 44444.45 requests per second
SADD: 45871.56 requests per second
SPOP: 47851.67 requests per second
LPUSH (again, in order to bench LRANGE): 43859.65 requests per second
LRANGE (first 100 elements): 7072.14 requests per second
LRANGE (first 300 elements): 2442.00 requests per second
LRANGE (first 450 elements): 1663.34 requests per second
LRANGE (first 600 elements): 1204.38 requests per second

Ruby Redis:

PING: 27472.53 requests per second
PING (multi bulk): 24154.59 requests per second
SET: 7610.35 requests per second
GET: 22273.94 requests per second
INCR: 23041.47 requests per second
LPUSH: 210.77 requests per second
LPOP: 15898.25 requests per second
SADD: 6558.03 requests per second
SPOP: 26251.97 requests per second
LPUSH (again, in order to bench LRANGE): 210.57 requests per second
LRANGE (first 100 elements): 1354.41 requests per second
LRANGE (first 300 elements): 497.69 requests per second
LRANGE (first 450 elements): 332.33 requests per second
LRANGE (first 600 elements): 254.10 requests per second

At best ruby-redis is about half as slow as the real redis, at worst it's more than 200 times slower.

from ruby-redis.

AE9RB avatar AE9RB commented on July 28, 2024

The readme benchmarks are from a 32-bit platform with 8k payload and 1000 parallel clients. Your write operations seem defective. My laptop just ran set=>19417, get=>18018, lpush=>15174, sadd=>16583. Please post more about your setup. What version of Ruby? Did you tune the benchmark options?

from ruby-redis.

catwell avatar catwell commented on July 28, 2024

I don't think the point is to have a fast implementation. It is rather to have an alternative implementation of the same protocol, which is always good. It can be used for learning, experimentation and behavior comparison. There's no reason to use it in production instead of the real Redis. Am I mistaken?

from ruby-redis.

haileys avatar haileys commented on July 28, 2024

@dturnbull:

I'm running 64 bit OS X on a Core 2 Quad with Ruby 1.9.2. I ran the default settings in redis-benchmark for both.

@catwell:

I realise that, I just don't believe the benchmarks given are very accurate.

from ruby-redis.

AE9RB avatar AE9RB commented on July 28, 2024

charliesome, there is something wrong with your Ruby install. There is no reason writing a string to a hash takes significantly longer than reading it back. From my MacBook Pro:

Using the default OSX Ruby 1.8.7-p174: set=>7639, get=>10869, lpush=>9718, sadd=>11579
Using MacPorts Ruby 1.9.2-p180: set=>19417, get=>18018, lpush=>15174, sadd=>16583

Roughly, you should expect Ruby Redis will perform 80% as well as C Redis on 32-bit platforms and about 50% on 64-bit.

from ruby-redis.

plukevdh avatar plukevdh commented on July 28, 2024

no longer see benchmarks in readme, trololol

from ruby-redis.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.