Monitoring indicators
-
Performance indicators: Performance
-
Memory specifications: Memory
-
Basic Activity indicator: Basic Activity
-
Persistence indicator: Persistence
-
Error indicator: Error
Performance indicators: Performance
Name | Description |
---|---|
latency | The time Redis takes to respond to a request |
instantaneous_ops_per_sec | Average number of requests processed per second |
hi rate(calculated) | Cache hit ratio (calculated |
Memory specifications: Memory
Name | Description |
---|---|
used_memory | Used memory |
mem_fragmentation_ratio | Memory fragmentation rate |
evicted_keys | The number of keys removed due to the maximum memory limit |
blocked_clients | Backup blocked client due to BLPOP,BRPOP,or BRPOPLPUSH |
Sorted out a Java core knowledge points. It covers JVM, locking, concurrency, Java reflection, Spring principle, microservices, Zookeeper, database, data structure and many other knowledge points. Basically covers all the technical knowledge of Java architecture information, but also covered the interview questions, but also some springboot project source code to share with you
Because there are so many data images that I’m not going to show them all together if I need to get this scan
Basic Activity indicator: Basic Activity
Name | Description |
---|---|
connected_clients | Number of client connections |
conected_laves | Number of slave |
master_last_io_seconds_ago | Number of seconds since last master-slave interaction |
keyspace | Total number of keys in the database |
Persistence indicator: Persistence
Name | Description |
---|---|
rdb_last_save_time | The disk timestamp is persisted for the last time |
rdb_changes_sice_last_save | The number of changes to the database since the last persistence |
Error indicator: Error
Name | Description |
---|---|
rejected_connections | The number of connections rejected because the maxClient limit was reached |
keyspace_misses | Number of key search failures (no match) |
master_link_down_since_seconds | Duration of master/slave disconnection in seconds |
Monitor the way
-
redis-benchmark
-
redis-stat
-
redis-faina
-
redislive
-
redis-cli
-
monitor
-
showlog
-
Get: Obtains slow query logs
-
Len: Obtains the number of slow query log entries
-
Reset: Resets slow query logs
Related configurations:
Slowlog - log - slower - than 1000 # set slow query time offline, unit: ms slowlog - Max - 100 # set len slow query command corresponding log length, unit: order numberCopy the code
Info (you can retrieve all the information at once, or you can retrieve the information by block)
-
Server: indicates the environment parameter of a server
-
Clients: indicates information about the client
-
Memory: indicates the statistics of server running memory
-
Persistence: Persisting information
-
Stats: General statistics
-
Replication: Information about primary and secondary Replication
-
CPU: indicates the CPU usage
-
Cluster: indicates the cluster information
-
Keypass: indicates the key value pair statistics
Terminal info command is used
. / redis - cli info according to block access to information | grep need to filter parameters. / redis - cli info stats | grep opsCopy the code
Use the interactive info command
#./redis-cli > info server
Copy the code
Performance monitoring:
Redis - cli info | grep ops # operations per second
Memory monitoring
SRC] [root @ CombCloud - 2020110836 #. / redis - cli info | grep, informs | grep human used_memory_human: 2.99 M # Total memory allocated by the memory allocator from the operating system USED_memory_rss_human: 8.04m # Memory usage seen by the operating system Memory seen by the top command used_memory_peak_human: 7.77m # redis Peak memory consumption USed_memory_luA_human :37.00K # Lua Memory used by the script engineCopy the code
Backup blocked client due to BLPOP,BRPOP,or BRPOPLPUSH
[root@CombCloud-2020110836 src]# ./redis-cli info | grep blocked_clientsblocked_clients:0
Copy the code
The number of keys removed due to the maximum memory limit
[root@CombCloud-2020110836 src]# ./redis-cli info | grep evicted_keysevicted_keys:0 #
Copy the code
Memory fragmentation rate
SRC] [root @ CombCloud - 2020110836 #. / redis - cli info | grep mem_fragmentation_ratiomem_fragmentation_ratio: 2.74Copy the code
Used memory
[root@CombCloud-2020110836 src]# ./redis-cli info | grep used_memory:used_memory:3133624
Copy the code
Basic activity indicators:
By observing how many clients Redis connects to, you can determine if there are any unexpected connections. If the quantity is not right, you can use the lcient List directive to list all the client link addresses to determine the source.
[root@CombCloud-2020110836 src]# ./redis-cli info | grep connected_clientsconnected_clients:1 [root@CombCloud-2020110836 SRC] #. / redis - cli info | grep connectedconnected_clients: 1 # client connection connected_slaves number: 1 # slave number of connectionsCopy the code
Durability indicators:
[root@CombCloud-2020110836 src]# ./redis-cli info | grep rdb_last_save_timerdb_last_save_time:1591876204 # Last persisted the timestamp of the disk/SRC root @ CombCloud - 2020110836 #. / redis - cli info | grep Rdb_changes_since_last_saverdb_changes_since_last_save :0 # Number of changes to the database since the last persistenceCopy the code
Error indicators
The number of times a client connection is rejected because the maximum number of connections is exceeded. If this number is large, it indicates that the server’s maximum number of connections is set too low and maxClients needs to be adjusted
[root@CombCloud-2020110836 src]# ./redis-cli info | grep connected_clientsconnected_clients:1
Copy the code
Hei KE Gong ji failed to find the key value
[root@CombCloud-2020110836 src]# ./redis-cli info | grep keyspacekeyspace_misses:0
Copy the code
Duration of master/slave disconnection in seconds
[root@CombCloud-2020110836 src]# ./redis-cli info | grep rdb_changes_since_last_saverdb_changes_since_last_save:0
Copy the code
Replication backlogs, if set too small, will cause instructions in them to be overwritten without offsets, triggering full synchronization
[root@CombCloud-2020110836 src]# ./redis-cli info | grep backlog_sizerepl_backlog_size:1048576
Copy the code
Determine whether the backlog buffer needs to be expanded by looking at the number of times the sync_partial_err variable, which represents the number of primary/secondary semi-synchronous replication failures
[root@CombCloud-2020110836 src]# ./redis-cli info | grep sync_partial_errsync_partial_err:1
Copy the code
Redis performance test command
./redis-benchmark -c 100 -n 5000
Copy the code
Description: 100 connections, 5000 requests for performance.