Membase vs memcached vs TokyoTyrant vs Redis
Membaseãå
¥ãã¦ã¿ãã®ã§ãå®éã«ã©ããããã®é度ãåºãã®ã試ãã¦ã¿ã¾ããã
memcached vs TokyoCabinet vs TokyoTyrant vs Redis - blog.katsuma.tv
ãã®è¨äºã®ãã¯ãªã§ãããããã«Membaseãå ãã¦ã¿ãæãã§ãã
ã¯ã©ã¤ã¢ã³ãã«ãã£ã¦é度ãå¤ããã®ãå«ã ã£ãã®ã§ããã¹ã¦Pythonã®memcachedã¯ã©ã¤ã¢ã³ãã使ã£ã¦ã1ä¸åsetãè¡ããã®æéãè¨æ¸¬ãã¦ã¿ã¾ããã
Membase | 1.18884205818 |
memcached | 0.683738946915 |
TokyoTyrant | 0.788640022278 |
Redis | 0.642278909683 |
æã£ãããMembaseãé ãâ¦ãã£ã¦è¨ããRediséãã
ã¾ã¨ã
使ããï¼Redisï¼APIãè±å¯ã ããã¬ããªã±ã¼ã·ã§ã³ã¨ããç°¡åããããï¼
ã¡ãªã¿ã«ä»åè¨æ¸¬ã«ä½¿ã£ãã³ã¼ãã¯ãã¡ã
# -*- coding: utf-8 -*- import time import memcache def get_message(kbytes): return "1234567890" * 100 * kbytes if __name__ == '__main__': # initialize server = [ '11211', #Mmebase '11212', #memcache '1978', #Tokyo Tyrant + tch '6379', #Redis ] for s in server: print s mc = memcache.Client(['127.0.0.1:'+ s]) mc.flush_all() message_num = 10000 message_size = 1 message = get_message(message_size) # set start_time = time.time() for index in range(message_num): mc.set(str(index), message) end_time = time.time() # print progress time progress_time = end_time - start_time print 'set time: %s' % progress_time