Coder Social home page Coder Social logo

minhajuddin / redis_vs_ets_showdown Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 2.36 MB

Redis vs ets benchmark for simple key value lookups

Home Page: https://github.com/minhajuddin/redis_vs_ets_showdown

Elixir 0.04% JavaScript 0.02% CSS 0.02% HTML 99.93%
redis ets erlang elixir key-value benchmark

redis_vs_ets_showdown's Introduction

RedisVsEtsShowdown

Benchmark Redis vs ets for simple key value stuff

How to use

# tweak vars in lib/bench.exs and run it
mix run lib/bench.exs

Quick explanation of names

ets_get_1000: does an ets lookup 1000 times

redis_get_1000: does a redis lookup 1000 times using HGET

ets_get_multi: does an ets lookup 1000 times

redis_get_multi: does a single HMGET Redis lookup

HTML reports available in the ./reports folder

https://minhajuddin.github.io/redis_vs_ets_showdown/reports/benchmark-1000.html
https://minhajuddin.github.io/redis_vs_ets_showdown/reports/benchmark-1000000.html

https://minhajuddin.github.io/redis_vs_ets_showdown/reports/benchmark-1000_comparison.html
https://minhajuddin.github.io/redis_vs_ets_showdown/reports/benchmark-1000000_comparison.html

Benchmark for 1000_000 records

Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
Number of Available Cores: 8
Available memory: 12.019272 GB
Elixir 1.5.1
Erlang 20.1
Benchmark suite executing with the following configuration:
warmup: 2.00 s
time: 30.00 s
parallel: 4
inputs: none specified
Estimated total run time: 2.13 min


Benchmarking ets_get_1000...
Benchmarking ets_get_multi...
Benchmarking redis_get_1000...
Benchmarking redis_get_multi...
Generated reports/benchmark-1000000.html
Generated reports/benchmark-1000000_comparison.html
Generated reports/benchmark-1000000_ets_get_1000.html
Generated reports/benchmark-1000000_ets_get_multi.html
Generated reports/benchmark-1000000_redis_get_1000.html
Generated reports/benchmark-1000000_redis_get_multi.html

Name                      ips        average  deviation         median
ets_get_multi          3.31 K        0.30 ms    ±20.60%        0.28 ms
ets_get_1000           2.87 K        0.35 ms    ±75.38%        0.31 ms
redis_get_multi        0.34 K        2.95 ms    ±17.46%        3.01 ms
redis_get_1000       0.0122 K       82.15 ms    ±15.77%       77.68 ms

Comparison:
ets_get_multi          3.31 K
ets_get_1000           2.87 K - 1.15x slower
redis_get_multi        0.34 K - 9.76x slower
redis_get_1000       0.0122 K - 271.91x slower

Benchmark for 1000 records

Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
Number of Available Cores: 8
Available memory: 12.019272 GB
Elixir 1.5.1
Erlang 20.1
Benchmark suite executing with the following configuration:
warmup: 2.00 s
time: 30.00 s
parallel: 4
inputs: none specified
Estimated total run time: 2.13 min


Benchmarking ets_get_1000...
Benchmarking ets_get_multi...
Benchmarking redis_get_1000...
Benchmarking redis_get_multi...
Generated benchmark-1000.html
Generated benchmark-1000_comparison.html
Generated benchmark-1000_ets_get_1000.html
Generated benchmark-1000_ets_get_multi.html
Generated benchmark-1000_redis_get_1000.html
Generated benchmark-1000_redis_get_multi.html

Name                      ips        average  deviation         median
ets_get_multi          4.06 K        0.25 ms    ±12.31%        0.24 ms
ets_get_1000           3.96 K        0.25 ms    ±18.72%        0.23 ms
redis_get_multi        0.34 K        2.90 ms    ±12.34%        2.99 ms
redis_get_1000       0.0115 K       87.27 ms    ±17.31%       81.36 ms

Comparison:
ets_get_multi          4.06 K
ets_get_1000           3.96 K - 1.02x slower
redis_get_multi        0.34 K - 11.78x slower
redis_get_1000       0.0115 K - 354.04x slower

redis_vs_ets_showdown's People

Contributors

minhajuddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.