x-redis 多线程 c++ redis 服务器和客户端开源项目

我要开发同款
匿名用户2018年02月05日
97阅读

技术信息

开源地址
https://gitee.com/zgzhanghao/xredis
授权协议
GPL

作品详情

这是一个多线程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.

功能介绍

这是一个多线程 c++ redis 服务器和客户端。 单核心的公开环境不到100k:redis 整体性能比 xredis 快 10-25%qps(因为使用 STL 和xredis 的内存管理成本...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论