当前位置:网站首页>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
由于我们并没有执行太多指令,或者某一条指令并没有用太多时间,所以查到的是空的

边栏推荐
- 【文本生成】论文合集推荐丨 斯坦福研究者引入时间控制方法 长文本生成更流畅
- 随手记01
- Compétences en mémoire des graphiques UML
- Once you change the test steps, write all the code. Why not try yaml to realize data-driven?
- 七层网络体系结构
- LeetCode:劍指 Offer 42. 連續子數組的最大和
- Mise en œuvre de la quantification post - formation du bminf
- [embedded] cortex m4f DSP Library
- IJCAI2022论文合集(持续更新中)
- Cesium draw points, lines, and faces
猜你喜欢

Improved deep embedded clustering with local structure preservation (Idec)

Computer graduation design PHP Zhiduo online learning platform

Booking of tourism products in Gansu quadrupled: "green horse" became popular, and one room of B & B around Gansu museum was hard to find

CUDA implementation of self defined convolution attention operator

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

Intel Distiller工具包-量化实现3

MongoDB 的安装和基本操作
![[sword finger offer] serialized binary tree](/img/e2/25c9322da3acda06c4517b0c50f81e.png)
[sword finger offer] serialized binary tree

LeetCode:221. Largest Square

Using C language to complete a simple calculator (function pointer array and callback function)
随机推荐
[OC]-<UI入门>--常用控件的学习
opencv+dlib实现给蒙娜丽莎“配”眼镜
MySQL uninstallation and installation methods
五层网络体系结构
LeetCode:26. 删除有序数组中的重复项
Pytest parameterization some tips you don't know / pytest you don't know
Pytest之收集用例规则与运行指定用例
一改测试步骤代码就全写 为什么不试试用 Yaml实现数据驱动?
MYSQL卸载方法与安装方法
Different data-driven code executes the same test scenario
LeetCode:387. 字符串中的第一个唯一字符
LeetCode:34. Find the first and last positions of elements in a sorted array
Intel Distiller工具包-量化实现3
Leetcode: Jianzhi offer 04 Search in two-dimensional array
I-BERT
Pytest's collection use case rules and running specified use cases
Ijcai2022 collection of papers (continuously updated)
LeetCode:498. Diagonal traversal
go-redis之初始化连接
LeetCode:124. 二叉树中的最大路径和