当前位置:网站首页>Redis' performance indicators and monitoring methods

Redis' performance indicators and monitoring methods

2022-07-06 09:14:00 ~Pompeii

Redis The performance index of 、 Monitoring mode

1. Performance index classification

1. Performance indicators :Performance
2. Memory metrics :Memory
3. Basic activity indicators :Basic activity
4. Persistence index :Persistence
5. Error indicators :Error

2.Performance

Low cache hit rate means that the server will be under great pressure ;
key The expiration time of will have a little impact on the cache hit rate

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-9EeHPBJN-1656729974671)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702102918685.png)]

3.Memory

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-4qGXqZWQ-1656729974672)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103146808.png)]

4.Basic activity

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-Uc49El2Z-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103210289.png)]

5.Persistence

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-VBwI2Tmj-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103408017.png)]

6.Error

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-OegbB1n3-1656729974673)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103518887.png)]

7. Monitoring mode

Tools ( Need to install )
1.Cloud Insight Redis
2.Prometheus
3.Redis-stat
4.Redis-faina
5.RedisLive
6.zabbix

command (redis These commands provided for us )
1.benchmark
2.redis cli
1)monitor
2)showlog

8.benchmark

command

redis-benchmark [-h ] [-p ] [-c ] [-n <requests]> [-k ]

Example 1
explain : By default ,50 A connection ,10000 The corresponding performance of the second request

redis-benchmark

Example 2
explain :100 A connection ,5000 The corresponding performance of the second request

redis-benchmark -c 100 -n 5000

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-3kfxzhbZ-1656729974674)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702103739871.png)]

9.monitor

The order is as follows , Used to print server debugging information

monitor

10.showlog

command
get : Get slow query log
len : Get the number of slow query log entries
reset : Reset slow query log

showlog [operator]

Related configuration
slowlog-log-slower-than 1000 # Set the offline time for slow query , Company : subtle
slowlog-max-len 100 # Set the log display length corresponding to the slow query command , Company : Number of orders

11. demonstration (benchmark)

No use redis It can be operated in the client

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-ABO9ElXR-1656729974675)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104213377.png)]

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-5Iy57IHG-1656729974675)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104239756.png)]

12. demonstration (monitor)

Must enter redis client .
send out hello

[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-9Jwem4Pj-1656729974676)(C:/Users/86158/AppData/Roaming/Typora/typora-user-images/image-20220702104435078.png)]

13.showlog

Because we didn't execute too many instructions , Or an instruction doesn't take much time , So what we found is empty

 Insert picture description here

原网站

版权声明
本文为[~Pompeii]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060859158688.html