1. redis 请求TPS: redis-benchmark 1000并发测试,不同KB数据测试

    • 1MB:

      SET测试2次失败,下面是GET结果

      -c 1000 -n 10000  -d 1048576  -q -t get
      GET: 32467.53 requests per second
      
    • 500KB:

      set测试2次失败,下面是GET结果

      -c 1000 -n 10000  -d 512000  -q -t get
      GET: 31746.03 requests per second
      
    • 200KB

      -c 1000 -n 10000  -d 204800  -q -t get,set
      SET: 317.41 requests per second
      GET: 31847.13 requests per second
      
    • 100KB

      -c 1000 -n 10000  -d 102400 -q -t get,set
      SET: 1211.09 requests per second
      GET: 33333.33 requests per second
      
    • 50KB

      -c 1000 -n 10000  -d 51200 -q -t get,set
      SET: 2503.76 requests per second
      GET: 33003.30 requests per second
      
    • 30KB

      -c 1000 -n 10000  -d 30720 -q -t get,set
      SET: 10362.69 requests per second
      GET: 29940.12 requests per second
      
    • 10KB

      -c 1000 -n 10000  -d 10240 -q -t get,set
      SET: 21141.65 requests per second
      GET: 32154.34 requests per second
      
    • 5KB

      -c 1000 -n 10000  -d 5120 -q -t get,set
      SET: 25062.66 requests per second
      GET: 30487.80 requests per second
      
    • 1KB

      -c 1000 -n 10000  -d 1024 -q -t get,set
      SET: 19607.84 requests per second
      GET: 31948.88 requests per second
      
  2. 总结

    • redis-benchmark测试1000并发1万次请求SET、GET不同大小数据的rps(每秒请求)

    • Redis 配置:

      • 实例规格: 16G集群性能增强版(8节点)
      • 网络类型:阿里云内网,带宽: 768 MB/s
      • 单实例内存:2G,8台
      • 版本: Redis 5.0
数据大小 SET 每秒请求 GET 每秒请求
1MB 测试2次失败 32467.53
500KB 测试2次失败 31746.03
200KB 317.41 31847.13
100KB 1211.09 33333.33
50KB 2503.76 33003.30
30KB 10362.69 29940.12
10KB 21141.65 32154.34
5KB 25062.66 30487.80
1KB 19607.84 31948.88
  • 上表说明SET的rps随数据减小增加,SET最大约2万rps,而GET不管大小都稳定3万rps左右

  • SET控制在100KB以内为佳,GET对大小不敏感;

  • 以上数据只是在特定的硬件环境的数据,其它环境可作为参考。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐