注意,进行性能测试首先要启动redis-server,不知道怎么安装redis的可以查看我的地址:https://www.cnblogs.com/zhushilai/p/13649228.html
./redis-server
然后换另外一个窗口,进入redis的src文件目录下面
1可以参考官网https://www.redis.net.cn/tutorial/3521.html
2
3测试100个并发连接,每个并发10万个请求,在src目录下运行
./redis-benchmark -h localhost -p 6379 -c 100 -n 100000
100000 requests completed in 1.25 seconds 对10万个请求进行写入测试,耗时1.25秒
100 parallel clients 100个并发客户端
3 bytes payload 每次写入3个字节
keep alive: 1 只保证有1台服务器来处理这些请求
所有请求3秒完成
每次完成79808.46个请求