当前位置:网站首页>Redis之性能指标、监控方式
Redis之性能指标、监控方式
2022-07-06 08:59:00 【~庞贝】
目录
Redis之性能指标、监控方式
1.性能指标分类
1.性能指标:Performance
2.内存指标:Memory
3.基本活动指标:Basic activity
4.持久性指标:Persistence
5.错误指标:Error
2.Performance
缓存命中率低意味着服务器压力就会非常大;
key的过期时间会对缓存命中率产生一点影响
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-9EeHPBJN-1656729974671)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702102918685.png)]](/img/7f/6339c7d971c0e3e94834e5aa9c919f.png)
3.Memory
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4qGXqZWQ-1656729974672)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103146808.png)]](/img/41/3068742d0bed7e9a472e2a5541861e.png)
4.Basic activity
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Uc49El2Z-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103210289.png)]](/img/4f/9c40b32286c534704e6718a37350c0.png)
5.Persistence
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VBwI2Tmj-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103408017.png)]](/img/18/de2a25a58ff92ea4b29c9d0cb780e9.png)
6.Error
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-OegbB1n3-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103518887.png)]](/img/0b/2bc8c277f24d625fc04bce805d4836.png)
7.监控方式
工具(需要安装)
1.Cloud Insight Redis
2.Prometheus
3.Redis-stat
4.Redis-faina
5.RedisLive
6.zabbix
命令(redis为我们提供的这些命令)
1.benchmark
2.redis cli
1)monitor
2)showlog
8.benchmark
命令
redis-benchmark [-h ] [-p ] [-c ] [-n <requests]> [-k ]
范例1
说明:默认下,50个连接,10000次请求对应的性能
redis-benchmark
范例2
说明:100个连接,5000次请求对应的性能
redis-benchmark -c 100 -n 5000
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3kfxzhbZ-1656729974674)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103739871.png)]](/img/40/067de4755d01938d4c6cd64f4a55b7.png)
9.monitor
命令如下,用于打印服务器调试信息
monitor
10.showlog
命令
get :获取慢查询日志
len :获取慢查询日志条目数
reset :重置慢查询日志
showlog [operator]
相关配置
slowlog-log-slower-than 1000 #设置慢查询的时间下线,单位:微妙
slowlog-max-len 100 #设置慢查询命令对应的日志显示长度,单位:命令数
11.演示(benchmark)
不用在redis客户端里就即可操作
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ABO9ElXR-1656729974675)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104213377.png)]](/img/4d/b496d64caa92721f8caa70f69fd5ee.png)
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5Iy57IHG-1656729974675)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104239756.png)]](/img/8e/56e46070072e92649dfaa6b904a64b.png)
12.演示(monitor)
必须进入redis客户端。
发送hello
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-9Jwem4Pj-1656729974676)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104435078.png)]](/img/6a/cc7b4bfdfea4aec0cea7f2d3545c35.png)
13.showlog
由于我们并没有执行太多指令,或者某一条指令并没有用太多时间,所以查到的是空的

边栏推荐
- Advanced Computer Network Review(5)——COPE
- Booking of tourism products in Gansu quadrupled: "green horse" became popular, and one room of B & B around Gansu museum was hard to find
- MongoDB 的安装和基本操作
- vb. Net changes with the window, scales the size of the control and maintains its relative position
- Pytest参数化你不知道的一些使用技巧 /你不知道的pytest
- TDengine 社区问题双周精选 | 第三期
- CSP first week of question brushing
- Advance Computer Network Review(1)——FatTree
- AcWing 2456. 记事本
- LeetCode:剑指 Offer 42. 连续子数组的最大和
猜你喜欢
![[oc]- < getting started with UI> -- common controls - prompt dialog box and wait for the prompt (circle)](/img/af/a44c2845c254e4f48abde013344c2b.png)
[oc]- < getting started with UI> -- common controls - prompt dialog box and wait for the prompt (circle)

LeetCode:221. 最大正方形

不同的数据驱动代码执行相同的测试场景
![[OC]-<UI入门>--常用控件-提示对话框 And 等待提示器(圈)](/img/af/a44c2845c254e4f48abde013344c2b.png)
[OC]-<UI入门>--常用控件-提示对话框 And 等待提示器(圈)

opencv+dlib实现给蒙娜丽莎“配”眼镜

Once you change the test steps, write all the code. Why not try yaml to realize data-driven?

An article takes you to understand the working principle of selenium in detail

LeetCode:236. The nearest common ancestor of binary tree

Selenium+pytest automated test framework practice
![[OC-Foundation框架]--<Copy对象复制>](/img/62/c04eb2736c2184d8826271781ac7e3.png)
[OC-Foundation框架]--<Copy对象复制>
随机推荐
[OC-Foundation框架]--<Copy对象复制>
LeetCode:836. Rectangle overlap
Esp8266-rtos IOT development
数字人主播618手语带货,便捷2780万名听障人士
LeetCode:394. String decoding
Notes 01
Once you change the test steps, write all the code. Why not try yaml to realize data-driven?
[oc foundation framework] - < copy object copy >
LeetCode:221. Largest Square
Improved deep embedded clustering with local structure preservation (Idec)
注意力机制的一种卷积替代方式
[OC-Foundation框架]---【集合数组】
CUDA实现focal_loss
Leetcode: Jianzhi offer 04 Search in two-dimensional array
KDD 2022 paper collection (under continuous update)
LeetCode:剑指 Offer 04. 二维数组中的查找
什么是MySQL?MySql的学习之路是怎样的
Pytest's collection use case rules and running specified use cases
LeetCode:剑指 Offer 03. 数组中重复的数字
[OC]-<UI入门>--常用控件的学习