Did performance of LRANGE dropped in 2.4.9 (comparing to 2.2.11)

68 views
Skip to first unread message

karol

unread,
Mar 29, 2012, 6:13:29 AM3/29/12
to redi...@googlegroups.com
I upgraded my Redis from 2.2.11 to 2.4.9 (Ubuntu 11.10, 64bit).
Some time ago I redis-benchmark'ed my old installation and now, out of curiosity did the benchmark again.

LRANGE performace degraded significantly for me, i.e. LRANGE_600 test showed decline from 21k to 11k
(all the numbers and details here: https://gist.github.com/2235525).

Is it to be expected? Is it Ubuntu not doing well here? Can I tune something?

Regards,
karol

Salvatore Sanfilippo

unread,
Mar 29, 2012, 7:29:25 AM3/29/12
to redi...@googlegroups.com
Hello Karol,

I think the problem is in redis-benchmark, not in the redis-server itself.
Please could you try with the same redis-benchmark to benchmark
against the two different versions of the server?

If the problem will be this as I suppose, I think this is done to the
fact that I upgraded the hiredis library lately in 2.4.x, however the
old function to set the "reader" methods to don't really parse the
reply from the client are now different and I don't know how to set
them to null. For sure Pieter Noordhuis knows how to do that ;)

Cheers,
Salvatore

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/7yT508c2Q2EJ.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

karol

unread,
Mar 29, 2012, 7:39:22 AM3/29/12
to redi...@googlegroups.com

Please could you try with the same redis-benchmark to benchmark
against the two different versions of the server?

Thanks for the quick answer! I'll try to downgrade Redis on my laptop and re-run the benchmarks again.

I'll keep You informed ;-) 

karol

unread,
Mar 29, 2012, 9:02:03 AM3/29/12
to redi...@googlegroups.com
Redis 2.2.11:
====== PING (inline) ======
149253.73 requests per second
====== PING ======
175438.59 requests per second
====== MSET (10 keys) ======
88495.58 requests per second
====== SET ======
156250.00 requests per second
====== GET ======
178571.42 requests per second
====== INCR ======
178571.42 requests per second
====== LPUSH ======
178571.42 requests per second
====== LPOP ======
178571.42 requests per second
====== SADD ======
178571.42 requests per second
====== SPOP ======
175438.59 requests per second
====== LPUSH (again, in order to bench LRANGE) ======
175438.59 requests per second
====== LRANGE (first 100 elements) ======
81967.21 requests per second
====== LRANGE (first 300 elements) ======
38022.81 requests per second
====== LRANGE (first 450 elements) ======
26809.65 requests per second
====== LRANGE (first 600 elements) ======
21929.82 requests per second

Redis 2.4.9
====== PING_INLINE ======
153846.16 requests per second
====== PING_BULK ======
172413.80 requests per second
====== SET ======
172413.80 requests per second
====== GET ======
178571.42 requests per second
====== INCR ======
178571.42 requests per second
====== LPUSH ======
178571.42 requests per second
====== LPOP ======
178571.42 requests per second
====== SADD ======
175438.59 requests per second
====== SPOP ======
172413.80 requests per second
====== LPUSH (needed to benchmark LRANGE) ======
175438.59 requests per second
====== LRANGE_100 (first 100 elements) ======
65359.48 requests per second
====== LRANGE_300 (first 300 elements) ======
21321.96 requests per second
====== LRANGE_500 (first 450 elements) ======
12484.39 requests per second
====== LRANGE_600 (first 600 elements) ======
12547.05 requests per second
====== MSET (10 keys) ======
109890.11 requests per second

Hope this helps,
Karol

Salvatore Sanfilippo

unread,
Mar 29, 2012, 9:08:12 AM3/29/12
to redi...@googlegroups.com
Are you 100% sure you obtained this numbers using the *same*
redis-benchmark binary?

I tried it myself and can't reproduce (but I can reproduce if I use
2.2 benchmark with 2.2, and 2.4 benchmark with 2.4).

Thanks,
Salvatore

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/redis-db/-/xJWBj3H4YAoJ.

karol

unread,
Mar 29, 2012, 9:47:15 AM3/29/12
to redi...@googlegroups.com
Are you 100% sure you obtained this numbers using the *same*
redis-benchmark binary?
Oh, I was too hasty! :(
You right. I've used two different redis-benchmark binaries.
I'll do better next time. Just need some more preparation.

Karol

karol

unread,
Mar 29, 2012, 10:43:00 AM3/29/12
to redi...@googlegroups.com
What I did now is:
1. installed redis 2.4.9 
2. copied redis-benchmark (redis-benchmark-2.4.9)
3. ran redis-benchmark.2.4.9 > 20409to20409.txt
4. unistalled redis 
5. installed redis 2.2.11
6. ran redis-benchmark.2.4.9 > 20409to20211.txt
7. extracted the data


The results are:
2.4.9 redis-benchmark testing 2.4.9 redis-server
====== PING_INLINE ======
151515.16 requests per second
====== PING_BULK ======
175438.59 requests per second
====== SET ======
175438.59 requests per second
====== GET ======
175438.59 requests per second
====== INCR ======
178571.42 requests per second
====== LPUSH ======
181818.19 requests per second
====== LPOP ======
178571.42 requests per second
====== SADD ======
178571.42 requests per second
====== SPOP ======
175438.59 requests per second
====== LPUSH (needed to benchmark LRANGE) ======
181818.19 requests per second
====== LRANGE_100 (first 100 elements) ======
64935.07 requests per second
====== LRANGE_300 (first 300 elements) ======
22675.74 requests per second
====== LRANGE_500 (first 450 elements) ======
16233.77 requests per second
====== LRANGE_600 (first 600 elements) ======
12422.36 requests per second
====== MSET (10 keys) ======
86956.52 requests per second

2.4.9 redis-benchmark testing 2.2.11 redis-server
====== PING_INLINE ======
142857.14 requests per second
====== PING_BULK ======
172413.80 requests per second
====== SET ======
178571.42 requests per second
====== GET ======
178571.42 requests per second
====== INCR ======
178571.42 requests per second
====== LPUSH ======
181818.19 requests per second
====== LPOP ======
178571.42 requests per second
====== SADD ======
175438.59 requests per second
====== SPOP ======
175438.59 requests per second
====== LPUSH (needed to benchmark LRANGE) ======
181818.19 requests per second
====== LRANGE_100 (first 100 elements) ======
65789.48 requests per second
====== LRANGE_300 (first 300 elements) ======
23584.91 requests per second
====== LRANGE_500 (first 450 elements) ======
12547.05 requests per second
====== LRANGE_600 (first 600 elements) ======
10775.86 requests per second
====== MSET (10 keys) ======
92592.59 requests per second

Side by side figures comparison:
142857.14 requests per second 151515.16 requests per second
172413.80 requests per second 175438.59 requests per second
178571.42 requests per second 175438.59 requests per second
178571.42 requests per second 175438.59 requests per second
178571.42 requests per second 178571.42 requests per second
181818.19 requests per second 181818.19 requests per second
178571.42 requests per second 178571.42 requests per second
175438.59 requests per second 178571.42 requests per second
175438.59 requests per second 175438.59 requests per second
181818.19 requests per second 181818.19 requests per second
65789.48 requests per second 64935.07 requests per second
23584.91 requests per second 22675.74 requests per second
12547.05 requests per second 16233.77 requests per second
10775.86 requests per second 12422.36 requests per second
92592.59 requests per second 86956.52 requests per second


Salvatore Sanfilippo

unread,
Mar 30, 2012, 6:36:53 AM3/30/12
to redi...@googlegroups.com
Thank you Karol,

more or less they are comparable, I've the feeling most of the
difference is in the error of measurement of every run.
We improved a few things related to I/0 from 2.2 to 2.4, and other
improvements are in 2.6 as well, but sometimes it is a bit hard to
measure because we lack a proper speed testing / regression
environment.

Cheers,
Salvatore

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/redis-db/-/BftSVOPFD4kJ.

Reply all
Reply to author
Forward
0 new messages