Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Performance of hgetall for 3287 keys

By: gkhot on Jun 27th, 2011  |  syntax: None  |  size: 1.52 KB  |  views: 218  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Keys.txt contains 3287 keys from our database. I ran the first five timed hgetall <keys> on the redis instance after the deletes but before restart:
  2.  
  3. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  4.  
  5. real    0m0.621s
  6. user    0m0.088s
  7. sys     0m0.175s
  8. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  9.  
  10. real    0m0.604s
  11. user    0m0.040s
  12. sys     0m0.084s
  13. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  14.  
  15. real    0m0.604s
  16. user    0m0.043s
  17. sys     0m0.078s
  18. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  19. ^[[A
  20. real    0m0.601s
  21. user    0m0.047s
  22. sys     0m0.099s
  23. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  24.  
  25. real    0m0.620s
  26. user    0m0.039s
  27. sys     0m0.087s
  28. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  29.  
  30. real    0m0.633s
  31. user    0m0.033s
  32. sys     0m0.074s
  33.  
  34. Ran this on keys.txt after the restart of the instance.
  35. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  36.  
  37. real    0m0.370s
  38. user    0m0.093s
  39. sys     0m0.165s
  40. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  41.  
  42. real    0m0.354s
  43. user    0m0.048s
  44. sys     0m0.101s
  45. [root@ip-10-218-83-236 src]# time /usr/local/bin/redis-cli -p 6382 < ~/keys.txt > /dev/null
  46.  
  47. real    0m0.352s
  48. user    0m0.041s
  49. sys     0m0.104s