windows10-Ubuntu 20.04.4 LTS-Redis 6.2.6 性能测试(1)

我在windows10 里面安装了Ubuntu 20.04.4 LTS,

然后在Ubuntu 20.04.4 LTS 安装了Redis 6.2.6。

下面我要进行性能测试

****

首先我打开一个Ubuntu 20.04.4 LTS ,就像是打开一个普通应用程序一样,然后弹出界面

Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Apr  8 10:28:53 CST 2022

  System load:    0.52      Processes:              9
  Usage of /home: unknown   Users logged in:        0
  Memory usage:   48%       IPv4 address for wifi0: 192.168.1.105
  Swap usage:     0%


10 updates can be applied immediately.
To see these additional updates run: apt list --upgradable


*** System restart required ***

This message is shown once a day. To disable it please create the
/home/gsz/.hushlogin file.

我输入redis-serve

然后返回:

3042:C 08 Apr 2022 10:29:10.577 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3042:C 08 Apr 2022 10:29:10.577 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=3042, just started
3042:C 08 Apr 2022 10:29:10.578 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
3042:M 08 Apr 2022 10:29:10.579 * Increased maximum number of open files to 10032 (it was originally set to 1024).
3042:M 08 Apr 2022 10:29:10.579 * monotonic clock: POSIX clock_gettime
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 6.2.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 3042
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           https://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

3042:M 08 Apr 2022 10:29:10.586 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
3042:M 08 Apr 2022 10:29:10.587 # Server initialized
3042:M 08 Apr 2022 10:29:10.587 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
3042:M 08 Apr 2022 10:29:10.588 * Loading RDB produced by version 6.2.6
3042:M 08 Apr 2022 10:29:10.588 * RDB age 28 seconds
3042:M 08 Apr 2022 10:29:10.589 * RDB memory usage when created 3.55 Mb
3042:M 08 Apr 2022 10:29:10.589 # Done loading RDB, keys loaded: 2, keys expired: 0.
3042:M 08 Apr 2022 10:29:10.591 * DB loaded from disk: 0.003 seconds
3042:M 08 Apr 2022 10:29:10.591 * Ready to accept connections

至此redis 的服务器开启完毕。

然后 我重新打开Ubuntu 20.04.4 LTS ,就像是打开一个普通应用程序一样,然后弹出界面。

然后输入

 redis-benchmark -c 50 -n 10000

然后返回很多东西

redis性能测试redis-benchmark - 日行一善g - 博客园

50个客户端同时请求Redis,一共一万次。默认只会有三个键值来回写入,可以通过keys *看到。

我们可以看到部分指令在1ms以内完成。牛X啊

  throughput summary: 40000.00 requests per second
  latency summary (msec):
          avg       min       p50       p95       p99       max
        0.636     0.160     0.607     0.863     0.983     1.391

 上图是Redis 官方的可视化软件,

可以看到 有50+2个客户端链接

每秒处理24566和指令

总共占用内存4MB

CPU占用19.69%

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值