Last active
June 29, 2017 23:53
-
-
Save kazeburo/608fc2ba0748e6ab3663 to your computer and use it in GitHub Desktop.
perl redis client benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# perl memcached.pl | |
Rate pp fast | |
pp 21167/s -- -89% | |
fast 197745/s 834% -- | |
# perl -Ilib -Iblib/arch eg/benchmark.pl | |
single get ======= | |
Rate redis fast hiredis jet | |
redis 34841/s -- -56% -68% -71% | |
fast 80082/s 130% -- -27% -33% | |
hiredis 109818/s 215% 37% -- -8% | |
jet 119673/s 243% 49% 9% -- | |
single incr ======= | |
Rate redis fast hiredis jet jet_noreply | |
redis 49025/s -- -40% -58% -59% -82% | |
fast 82195/s 68% -- -29% -32% -69% | |
hiredis 115936/s 136% 41% -- -4% -57% | |
jet 120445/s 146% 47% 4% -- -55% | |
jet_noreply 268163/s 447% 226% 131% 123% -- | |
pipeline ======= | |
Rate redis fast jet jet_noreply | |
redis 15466/s -- -74% -87% -90% | |
fast 58565/s 279% -- -49% -64% | |
jet 115567/s 647% 97% -- -28% | |
jet_noreply 161278/s 943% 175% 40% -- | |
benchmark script https://github.com/kazeburo/Redis-Jet/blob/master/eg/benchmark.pl | |
Physical server | |
Intel(R) Xeon(R) CPU E3-1240 v3 @ 3.40GHz | 4core/8thread | |
redis-2.8.17 | |
memcached-1.4.17 | |
Perl-5.20.1 | |
Redis 1.976 | |
Redis::Fast 0.13 | |
Redis::hiredis 0.11.0 | |
Cache::Memcached::Fast 0.22 | |
Cache::Memcached 1.30 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Cache::Memcached; | |
use Cache::Memcached::Fast; | |
use Benchmark qw/cmpthese/; | |
my $m = Cache::Memcached->new( +{ servers => ['127.0.0.1:11211'] } ); | |
$m->enable_compress(0); | |
my $fast = Cache::Memcached::Fast->new( +{ servers => ['127.0.0.1:11211'] } ); | |
$m->set( 'foo' => 'foovalue' ); | |
cmpthese( | |
-3 => +{ | |
pp => sub { | |
$m->get('foo'); | |
}, | |
fast => sub { | |
$fast->get('foovalue'); | |
}, | |
} | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment