x-redis 多线程 c++ redis 服务器和客户端

程序名称:x-redis

授权协议: GPL

操作系统: 跨平台

开发语言: C/C++

x-redis 介绍

这是一个多线程 c++ redis 服务器和客户端。

单核心的公开环境不到100k:redis 整体性能比 xredis 快 10-25%qps(因为使用 STL 和xredis
的内存管理成本线程安全)内核瓶颈 80-90%cpu benchmark.pdf

Redis速度有多快?

Redis包含了一个redis- benchmark实用程序,它可以模拟N个客户端执行的运行命令,同时发送M个总查询(类似于Apache的ab实用程序)。

在下面你会发现一个基于Linux基准测试的完整输出。

支持以下选项:

Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]> [-k <boolean>]

 -h <hostname>      Server hostname (default 127.0.0.1)
 -p <port>          Server port (default 6379)
 -s <socket>        Server socket (overrides host and port)
 -a <password>      Password for Redis Auth
 -c <clients>       Number of parallel connections (default 50)
 -n <requests>      Total number of requests (default 100000)
 -d <size>          Data size of SET/GET value in bytes (default 2)
 --dbnum <db>       SELECT the specified db number (default 0)
 -k <boolean>       1=keep alive 0=reconnect (default 1)
 -r <keyspacelen>   Use random keys for SET/GET/INCR, random values for SADD
  Using this option the benchmark will expand the string __rand_int__
  inside an argument with a 12 digits number in the specified range
  from 0 to keyspacelen-1. The substitution changes every time a command
  is executed. Default tests use this to hit random keys in the
  specified range.
 -P <numreq>        Pipeline <numreq> requests. Default 1 (no pipeline).
 -q                 Quiet. Just show query/sec values
 --csv              Output in CSV format
 -l                 Loop. Run the tests forever
 -t <tests>         Only run the comma separated list of tests. The test
                    names are the same as the ones produced as output.
 -I                 Idle mode. Just open N idle connections and wait.

x-redis 官网

https://gitee.com/zgzhanghao/xredis

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐