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

边栏推荐
- Leetcode: Jianzhi offer 03 Duplicate numbers in array
- Intel Distiller工具包-量化实现1
- LeetCode:221. Largest Square
- Intel Distiller工具包-量化实现3
- LeetCode:236. The nearest common ancestor of binary tree
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- 使用标签模板解决用户恶意输入的问题
- Ijcai2022 collection of papers (continuously updated)
- KDD 2022论文合集(持续更新中)
- Pytest之收集用例规则与运行指定用例
猜你喜欢

什么是MySQL?MySql的学习之路是怎样的

In depth analysis and encapsulation call of requests

【图的三大存储方式】只会用邻接矩阵就out了

LeetCode41——First Missing Positive——hashing in place & swap

Pytest's collection use case rules and running specified use cases

Intel Distiller工具包-量化实现2

Alibaba cloud server mining virus solution (practiced)

SAP ui5 date type sap ui. model. type. Analysis of the parsing format of date
![[OC foundation framework] - string and date and time >](/img/75/e20064fd0066810135771a01f54360.png)
[OC foundation framework] - string and date and time >

Improved deep embedded clustering with local structure preservation (Idec)
随机推荐
Intel distiller Toolkit - Quantitative implementation 1
Detailed explanation of dynamic planning
使用标签模板解决用户恶意输入的问题
Philosophical enlightenment from single point to distributed
[OC foundation framework] - string and date and time >
使用latex导出IEEE文献格式
Advanced Computer Network Review(5)——COPE
Once you change the test steps, write all the code. Why not try yaml to realize data-driven?
xargs命令的基本用法
Notes 01
What is the role of automated testing frameworks? Shanghai professional third-party software testing company Amway
超高效!Swagger-Yapi的秘密
[OC foundation framework] - [set array]
Tdengine biweekly selection of community issues | phase III
Digital people anchor 618 sign language with goods, convenient for 27.8 million people with hearing impairment
UML图记忆技巧
Intel Distiller工具包-量化实现1
多元聚类分析
数学建模2004B题(输电问题)
自定义卷积注意力算子的CUDA实现