tendis是腾讯互娱根据redis改写的一个磁盘存储nosql
简单一句话总结redis和tendis就是,redis是存在内存,tendis存在磁盘,其他的啥操作、一致性协议那些基本一样
github链接:https://github.com/Tencent/Tendis
tendis目前我还没找到有可用的软件元可以直接yum,只好乖乖地编译源码了
编译配置需要
g++ (required by c++17, version >= 5.5)
cmake (version >= 3.13.0
gcc如果本身就有了,可以用下面的代码来切换
yum -y install centos-release-scl #Software Collections yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash #切换当前gcc版本,仅仅可以在当前shell切换
git clone https://github.com/Tencent/tendis.git --recursive git submodule update --init --recursive mkdir bulid cd build && cmake .. make -j12
进入到tendis目录,运行tendis服务
./build/bin/tendisplus tendisplus.conf
运行
redis-cli -p 51002
运行后,可以结合pgrep、top,根据进程名查看进程的cpu情况, io同理
top -p $(pgrep -f -d, redis-benchmark)
参数说明如下:
主要测试的命令为lpush和rpop
tendis的测试目录在 ./tendis/performance_test_tools/tool, 测试tendis性能需使用到里面官方重新编译过的redis-benchmark。我测试主要使用的命令
./redis-benchmark -p 51002 -n 1000000 -c 600 -t rpop -d 100 -q -l ./redis-benchmark -p 51002 -n 1000000 -c 600 -t plush -d 100 -q -l