Detailed redis state

redis View status information

  • info all|default
  • Info designated items

Information Server server

  • redis_version: Redis server version
  • redis_git_sha1: Go SHA1
  • redis_git_dirty : Git dirty flag
  • os: Redis server host operating system
  • arch_bits: Architecture (32 or 64)
  • multiplexing_api: Redis event handling mechanism used
  • gcc_version: GCC version used to compile Redis
  • process_id: PID of the server process
  • run_id: Redis random identifier server (and to cluster Sentinel)
  • tcp_port: TCP / IP listening port
  • uptime_in_seconds: Since Redis server is started, the number of seconds
  • uptime_in_days: Since Redis server is started, the number of days elapsed
  • lru_clock: in minutes clock increment for managing LRU

clients connected client information

  • connected_clients: the number of clients connected (not including a client connected by a slave server)
  • client_longest_output_list: current client connections among the longest output list
  • client_longest_input_buf: The current client connections among the largest input buffer
  • The number of clients is waiting for blocking command (BLPOP, BRPOP, BRPOPLPUSH) of: blocked_clients

memory Memory Information

  • used_memory: the total amount of memory allocated by Redis dispenser bytes (byte) units
  • used_memory_human: Returns Redis distribution in a human readable format amount of memory
  • used_memory_rss: From the operating system point of view, the total return Redis memory allocated (commonly known as resident set size). This value is consistent with the output and top, ps and other commands.
  • used_memory_peak: Memory consumption Redis peak (in bytes)
  • used_memory_peak_human: Returns the peak memory consumption Redis in human-readable form
  • used_memory_lua: Lua engine used memory size (in bytes)
  • And the ratio between the used_memory_rss used_memory: mem_fragmentation_ratio
  • mem_allocator: specified at compile time, memory allocator Redis used. It can be libc, jemalloc or tcmalloc.
  • In the ideal case, the value should used_memory_rss used_memory only slightly higher than a little.
  • When rss> used, and the difference between the two values ​​is large, indicating the presence (internal or external) memory fragmentation.
  • Memory fragmentation can be seen that the ratio of a value of mem_fragmentation_ratio.
  • When used> rss, showing part of the memory system is operated Redis swapped out to the swap space, in this case, the operation may cause a noticeable delay.
  • Because Redis does not have control over how its allocations are mapped to memory pages, highused_memory_rss is often the result of a spike in memory usage.
  • Redis is released when the memory allocator may, or may not, be returned to the operating system memory.
  • If Redis release the memory, but the memory will not be returned to the operating system, then the value of used_memory may not be consistent and Redis memory footprint of the operating system displays.
  • View used_memory_peak value can be verified whether this occurred.

4, persistence: RDB and persistence AOF related information

  • loading: 0 a flag value, records whether the server is loaded persistent file
  • rdb_changes_since_last_save: 0 distance after the last successful create persistent file, change the number of keys
  • rdb_bgsave_in_progress: 0 whether a flag value, recorded file server is created RDB
  • rdb_last_save_time: 1338011402 Last time RDB successfully created UNIX files
  • rdb_last_bgsave_status: ok a flag value, recorded the results of the last file is created RDB success or failure
  • rdb_last_bgsave_time_sec: -1 record last RDB file created in seconds takes
  • rdb_current_bgsave_time_sec: -1 If the server is created RDB file, then the value of the current record is created RDB operation has spent much time (in seconds)
  • aof_enabled: 0 a flag value, recorded AOF is in the open state
  • aof_rewrite_in_progress: 0 a flag value, whether the server records the file is being created AOF
  • aof_rewrite_scheduled: 0 a flag value, recorded AOF after RDB files you've created, if you need to perform a rewrite operation reservation
  • aof_last_rewrite_time_sec: -1 Processed record of the last rewrite operation AOF
  • aof_current_rewrite_time_sec: -1 if the server AOF rewrite operation in progress, then this is the current value of the overwrite recording operation has been time-consuming (in seconds)
  • aof_last_bgrewrite_status: ok a flag value, recorded the results of the last rewrite AOF document success or failure

5, stats: General Statistical Information

  • total_connections_received: 1 server has accepted the connection request quantity
  • total_commands_processed: 0 The number of commands the server has executed
  • 0 The number of commands executed per server: instantaneous_ops_per_sec
  • rejected_connections: 0 because the maximum number of clients and limit the number of connection requests rejected
  • expired_keys: 0 Number of database keys as expired automatically deleted
  • evicted_keys: 0 as the maximum memory capacity limit was expelled (The evict) the number of key
  • keyspace_hits: 0 Find the number of database key success
  • keyspace_misses: 0 Find number of key database failed
  • pubsub_channels: 0 number of channels currently subscribed
  • pubsub_patterns: 0 Number of currently subscribed mode
  • latest_fork_usec: 0 last fork () operation takes time (ms)

6, replication: copy the information from the master information displayed on the master

  • role: the role of master # instance, is master or slave
  • connected_slaves: slave number of instances connected to the # 1
  • slave0: ip = 192.168.64.104, port = 9021, state = online, offset = 6713173004, lag = 0 #lag REPLCONF command is not transmitted to the main number of seconds from the library Library
  • master_repl_offset: 6713173145 # master-slave synchronization offset, and if this value is the same as described above offset from the main delay not consistent
  • repl_backlog_active: 1 # copy backlog buffer is turned on
  • repl_backlog_size: 134217728 # copy backlog buffer size
  • repl_backlog_first_byte_offset: 6578955418 # copy the buffer size of the offset
  • repl_backlog_histlen: 134217728 # This value is equal master_repl_offset - repl_backlog_first_byte_offset, this value does not exceed the size of repl_backlog_size

6, replication: copy the information from the master information displayed on the slave

  • role: the role of slave # instance, is master or slave
  • master_host: 192.168.64.102 # corresponding to the master node ip
  • master_port: 9021 # corresponding to the master node port
  • master_link_status: up #slave end view synchronization state between it and the master, when the copying represented disconnected down
  • master_last_io_seconds_ago: 0 # main library how many seconds does not send data to from the library?
  • master_sync_in_progress: 0 # whether to synchronize with the master server from the server
  • slave_repl_offset: 6713173818 #slave replication offset
  • slave_priority: 100 #slave priority
  • slave_read_only: 1 # from the library is set read-only
  • connected_slaves: slave number of instances # 0 connected
  • master_repl_offset:0
  • repl_backlog_active: 0 # copy backlog buffer is turned on
  • repl_backlog_size: 134217728 # copy backlog buffer size
  • repl_backlog_first_byte_offset: 0 # copy the buffer size of the offset
  • repl_backlog_histlen: 0 # This value is equal master_repl_offset - repl_backlog_first_byte_offset, this value does not exceed the size of repl_backlog_size

7, cpu: cput computational statistics

  • used_cpu_sys: 0.03 Redis server CPU consuming system
  • used_cpu_user: 0.01 Redis server user consuming CPU
  • used_cpu_sys_children: 0.00 Redis background processes consuming CPU system
  • used_cpu_user_children: 0.00 Redis background processes consuming CPU user

8, commandstats: redis command statistics

  • cmdstat_get: calls = 1664657469, usec = 8266063320, usec_per_call = 4.97 #call each command execution times, CPU duration (in microseconds) usec total consumption, CPU consumption per average duration (in microseconds)

9, cluster: redis cluster information

  • cluster_enabled: 1 # instance whether to enable cluster mode

10, keyspace: database-related statistics

  • db0: keys = 2, expires = 0, avg_ttl = 0 0 database has two keys, the number has been deleted expired key to 0, and the number of key with survival

redis View and monitor the performance of common tools

Benchmark-1.redis
redis reference information, server performance testing redis
redis-Benchmark -H -n localhost -p 6379 100000 100 -C
100 concurrent connections, 100,000 requests for the host detects localhost port 6379 of server performance redis

 

redis View status information

  • info all|default
  • Info designated items

Information Server server

  • redis_version: Redis server version
  • redis_git_sha1: Go SHA1
  • redis_git_dirty : Git dirty flag
  • os: Redis server host operating system
  • arch_bits: Architecture (32 or 64)
  • multiplexing_api: Redis event handling mechanism used
  • gcc_version: GCC version used to compile Redis
  • process_id: PID of the server process
  • run_id: Redis random identifier server (and to cluster Sentinel)
  • tcp_port: TCP / IP listening port
  • uptime_in_seconds: Since Redis server is started, the number of seconds
  • uptime_in_days: Since Redis server is started, the number of days elapsed
  • lru_clock: in minutes clock increment for managing LRU

clients connected client information

  • connected_clients: the number of clients connected (not including a client connected by a slave server)
  • client_longest_output_list: current client connections among the longest output list
  • client_longest_input_buf: The current client connections among the largest input buffer
  • The number of clients is waiting for blocking command (BLPOP, BRPOP, BRPOPLPUSH) of: blocked_clients

memory Memory Information

  • used_memory: the total amount of memory allocated by Redis dispenser bytes (byte) units
  • used_memory_human: Returns Redis distribution in a human readable format amount of memory
  • used_memory_rss: From the operating system point of view, the total return Redis memory allocated (commonly known as resident set size). This value is consistent with the output and top, ps and other commands.
  • used_memory_peak: Memory consumption Redis peak (in bytes)
  • used_memory_peak_human: Returns the peak memory consumption Redis in human-readable form
  • used_memory_lua: Lua engine used memory size (in bytes)
  • And the ratio between the used_memory_rss used_memory: mem_fragmentation_ratio
  • mem_allocator: specified at compile time, memory allocator Redis used. It can be libc, jemalloc or tcmalloc.
  • In the ideal case, the value should used_memory_rss used_memory only slightly higher than a little.
  • When rss> used, and the difference between the two values ​​is large, indicating the presence (internal or external) memory fragmentation.
  • Memory fragmentation can be seen that the ratio of a value of mem_fragmentation_ratio.
  • When used> rss, showing part of the memory system is operated Redis swapped out to the swap space, in this case, the operation may cause a noticeable delay.
  • Because Redis does not have control over how its allocations are mapped to memory pages, highused_memory_rss is often the result of a spike in memory usage.
  • Redis is released when the memory allocator may, or may not, be returned to the operating system memory.
  • If Redis release the memory, but the memory will not be returned to the operating system, then the value of used_memory may not be consistent and Redis memory footprint of the operating system displays.
  • View used_memory_peak value can be verified whether this occurred.

4, persistence: RDB and persistence AOF related information

  • loading: 0 a flag value, records whether the server is loaded persistent file
  • rdb_changes_since_last_save: 0 distance after the last successful create persistent file, change the number of keys
  • rdb_bgsave_in_progress: 0 whether a flag value, recorded file server is created RDB
  • rdb_last_save_time: 1338011402 Last time RDB successfully created UNIX files
  • rdb_last_bgsave_status: ok a flag value, recorded the results of the last file is created RDB success or failure
  • rdb_last_bgsave_time_sec: -1 record last RDB file created in seconds takes
  • rdb_current_bgsave_time_sec: -1 If the server is created RDB file, then the value of the current record is created RDB operation has spent much time (in seconds)
  • aof_enabled: 0 a flag value, recorded AOF is in the open state
  • aof_rewrite_in_progress: 0 a flag value, whether the server records the file is being created AOF
  • aof_rewrite_scheduled: 0 a flag value, recorded AOF after RDB files you've created, if you need to perform a rewrite operation reservation
  • aof_last_rewrite_time_sec: -1 Processed record of the last rewrite operation AOF
  • aof_current_rewrite_time_sec: -1 if the server AOF rewrite operation in progress, then this is the current value of the overwrite recording operation has been time-consuming (in seconds)
  • aof_last_bgrewrite_status: ok a flag value, recorded the results of the last rewrite AOF document success or failure

5, stats: General Statistical Information

  • total_connections_received: 1 server has accepted the connection request quantity
  • total_commands_processed: 0 The number of commands the server has executed
  • 0 The number of commands executed per server: instantaneous_ops_per_sec
  • rejected_connections: 0 because the maximum number of clients and limit the number of connection requests rejected
  • expired_keys: 0 Number of database keys as expired automatically deleted
  • evicted_keys: 0 as the maximum memory capacity limit was expelled (The evict) the number of key
  • keyspace_hits: 0 Find the number of database key success
  • keyspace_misses: 0 Find number of key database failed
  • pubsub_channels: 0 number of channels currently subscribed
  • pubsub_patterns: 0 Number of currently subscribed mode
  • latest_fork_usec: 0 last fork () operation takes time (ms)

6, replication: copy the information from the master information displayed on the master

  • role: the role of master # instance, is master or slave
  • connected_slaves: slave number of instances connected to the # 1
  • slave0: ip = 192.168.64.104, port = 9021, state = online, offset = 6713173004, lag = 0 #lag REPLCONF command is not transmitted to the main number of seconds from the library Library
  • master_repl_offset: 6713173145 # master-slave synchronization offset, and if this value is the same as described above offset from the main delay not consistent
  • repl_backlog_active: 1 # copy backlog buffer is turned on
  • repl_backlog_size: 134217728 # copy backlog buffer size
  • repl_backlog_first_byte_offset: 6578955418 # copy the buffer size of the offset
  • repl_backlog_histlen: 134217728 # This value is equal master_repl_offset - repl_backlog_first_byte_offset, this value does not exceed the size of repl_backlog_size

6, replication: copy the information from the master information displayed on the slave

  • role: the role of slave # instance, is master or slave
  • master_host: 192.168.64.102 # corresponding to the master node ip
  • master_port: 9021 # corresponding to the master node port
  • master_link_status: up #slave end view synchronization state between it and the master, when the copying represented disconnected down
  • master_last_io_seconds_ago: 0 # main library how many seconds does not send data to from the library?
  • master_sync_in_progress: 0 # whether to synchronize with the master server from the server
  • slave_repl_offset: 6713173818 #slave replication offset
  • slave_priority: 100 #slave priority
  • slave_read_only: 1 # from the library is set read-only
  • connected_slaves: slave number of instances # 0 connected
  • master_repl_offset:0
  • repl_backlog_active: 0 # copy backlog buffer is turned on
  • repl_backlog_size: 134217728 # copy backlog buffer size
  • repl_backlog_first_byte_offset: 0 # copy the buffer size of the offset
  • repl_backlog_histlen: 0 # This value is equal master_repl_offset - repl_backlog_first_byte_offset, this value does not exceed the size of repl_backlog_size

7, cpu: cput computational statistics

  • used_cpu_sys: 0.03 Redis server CPU consuming system
  • used_cpu_user: 0.01 Redis server user consuming CPU
  • used_cpu_sys_children: 0.00 Redis background processes consuming CPU system
  • used_cpu_user_children: 0.00 Redis background processes consuming CPU user

8, commandstats: redis command statistics

  • cmdstat_get: calls = 1664657469, usec = 8266063320, usec_per_call = 4.97 #call each command execution times, CPU duration (in microseconds) usec total consumption, CPU consumption per average duration (in microseconds)

9, cluster: redis cluster information

  • cluster_enabled: 1 # instance whether to enable cluster mode

10, keyspace: database-related statistics

  • db0: keys = 2, expires = 0, avg_ttl = 0 0 database has two keys, the number has been deleted expired key to 0, and the number of key with survival

redis View and monitor the performance of common tools

Benchmark-1.redis
redis reference information, server performance testing redis
redis-Benchmark -H -n localhost -p 6379 100000 100 -C
100 concurrent connections, 100,000 requests for the host detects localhost port 6379 of server performance redis

Guess you like

Origin www.cnblogs.com/guarderming/p/11084142.html