Home  >  Article  >  Database  >  How to monitor redis performance in real time

How to monitor redis performance in real time

王林
王林forward
2021-02-20 10:31:252580browse

How to monitor redis performance in real time

Foreword:

Redis is a key-value storage system written by Salvatore Sanfilippo. It is a cross-platform non-relational database.

Redis is an open source key-value (Key-Value) storage database written in ANSI C language, complying with the BSD protocol, supporting network, memory-based, distributed, and optional persistence, and provides multiple language API.

Main content:

1. How to view monitoring

After installing Redis, you can use the built-in connection client redis-cli to connect to the Redis service. Use the info command. All redis running status can be viewed

[root@node1 ~]# redis-cli info all #View redis information

The next step is to know and analyze each parameter The meaning of Status information

(Learning video sharing:

redis video tutorial

)

connected_clients 
◦已连接客户端的数量(不包括通过从属服务器连接的客户端)


• client_longest_output_list 
◦当前连接的客户端当中,最长的输出列表


• client_longest_input_buf 
◦当前连接的客户端当中,最大输入缓存


• blocked_clients 
◦正在等待阻塞命令(BLPOP、BRPOP、BRPOPLPUSH)的客户端的数量

Use the following command to monitor the current dbindex information of redis

used_memory 
◦当前使用的内存信息,以字节为单位


• used_memory_rss 
◦当前操作系统分配给 Redis 的内存


• used_memory_peak 
◦Redis 的内存消耗峰值,以字节为单位


• used_memory_peak_human 
◦以人类可读的格式返回 Redis 的内存消耗峰值


• mem_fragmentation_ratio 
◦ used_memory_rss  和  used_memory  之间的比率

Reference address :

redis tutorial: http://www.runoob.com/redis/redis-tutorial.htmlredis Baidu Encyclopedia: https://baike.baidu.com/item/Redis /6549233?fr=aladdin

redis official website: https://redis.io/

Related recommendations:

redis database tutorial

The above is the detailed content of How to monitor redis performance in real time. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete