这是一个多线程c++redis服务器和客户端。
单核心的公开环境不到100k:redis整体性能比xredis快10-25%qps(因为使用STL和xredis的内存管理成本线程安全)内核瓶颈80-90%cpubechmark.pdf
Redis速度有多快?
Redis包含了一个redis-bechmark实用程序,它可以模拟N个客户端执行的运行命令,同时发送M个总查询(类似于Apache的ab实用程序)。
在下面你会发现一个基于Liux基准测试的完整输出。
支持以下选项:
Usage: redis-bechmark [-h <host>] [-p <port>] [-c <cliets>] [- <requests]> [-k <boolea>] -h <hostame> Server hostame (default 127.0.0.1) -p <port> Server port (default 6379) -s <socket> Server socket (overrides host ad port) -a <password> Password for Redis Auth -c <cliets> Number of parallel coectios (default 50) - <requests> Total umber of requests (default 100000) -d <size> Data size of SET/GET value i bytes (default 2) --dbum <db> SELECT the specified db umber (default 0) -k <boolea> 1=keep alive 0=recoect (default 1) -r <keyspacele> Use radom keys for SET/GET/INCR, radom values for SADD Usig this optio the bechmark will expad the strig __rad_it__ iside a argumet with a 12 digits umber i the specified rage from 0 to keyspacele-1. The substitutio chages every time a commad is executed. Default tests use this to hit radom keys i the specified rage. -P <umreq> Pipelie <umreq> requests. Default 1 (o pipelie). -q Quiet. Just show query/sec values --csv Output i CSV format -l Loop. Ru the tests forever -t <tests> Oly ru the comma separated list of tests. The test ames are the same as the oes produced as output. -I Idle mode. Just ope N idle coectios ad wait.









评论