1. redis-benchmark是 redis的性能监测工具
Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]> [-k <boolean>] -h <hostname> Server hostname (default 127.0.0.1) -p <port> Server port (default 6379) -s <socket> Server socket (overrides host and port) -c <clients> Number of parallel connections (default 50) -n <requests> Total number of requests (default 10000) -d <size> Data size of SET/GET value in bytes (default 2) -k <boolean> 1=keep alive 0=reconnect (default 1) -r <keyspacelen> Use random keys for SET/GET/INCR, random values for SADD Using this option the benchmark will get/set keys in the form mykey_rand:000000012456 instead of constant keys, the <keyspacelen> argument determines the max number of values for the random number. For instance if set to 10 only rand:000000000000 - rand:000000000009 range will be allowed. -P <numreq> Pipeline <numreq> requests. Default 1 (no pipeline). -q Quiet. Just show query/sec values 只显示每秒钟能处理多少请求数结果 --csv Output in CSV format -l Loop. Run the tests forever 永久测试 -t <tests> Only run the comma separated list of tests. The test names are the same as the ones produced as output. -I Idle mode. Just open N idle connections and wait.
redis-benchmark -h localhost -p 6379 -c 100 -n 100000
100个并发连接,100000个请求,检测host为localhost端口为6379的redis服务器的性能。
====== PING_INLINE ====== 100000 requests completed in 1.13 seconds 100 parallel clients 3 bytes payload keep alive: 1 44.60% <= 1 milliseconds 100.00% <= 1 milliseconds 88105.73 requests per second ====== PING_BULK ====== 100000 requests completed in 1.13 seconds 100 parallel clients 3 bytes payload keep alive: 1 40.55% <= 1 milliseconds 99.94% <= 2 milliseconds 100.00% <= 2 milliseconds 88261.25 requests per second ====== SET ====== 100000 requests completed in 1.16 seconds 100 parallel clients 3 bytes payload keep alive: 1 46.39% <= 1 milliseconds 99.90% <= 2 milliseconds 99.98% <= 3 milliseconds 100.00% <= 3 milliseconds 86058.52 requests per second ====== GET ====== 100000 requests completed in 1.16 seconds 100 parallel clients 3 bytes payload keep alive: 1 55.14% <= 1 milliseconds 99.87% <= 2 milliseconds 100.00% <= 2 milliseconds 86058.52 requests per second ====== INCR ====== 100000 requests completed in 1.16 seconds 100 parallel clients 3 bytes payload keep alive: 1 51.43% <= 1 milliseconds 99.70% <= 2 milliseconds 99.89% <= 3 milliseconds 99.92% <= 4 milliseconds 100.00% <= 4 milliseconds 86505.19 requests per second ====== LPUSH ====== 100000 requests completed in 1.14 seconds 100 parallel clients 3 bytes payload keep alive: 1 36.27% <= 1 milliseconds 99.90% <= 2 milliseconds 100.00% <= 2 milliseconds 87565.68 requests per second ====== LPOP ====== 100000 requests completed in 1.13 seconds 100 parallel clients 3 bytes payload keep alive: 1 49.68% <= 1 milliseconds 100.00% <= 1 milliseconds 88731.15 requests per second ====== SADD ====== 100000 requests completed in 1.13 seconds 100 parallel clients 3 bytes payload keep alive: 1 37.29% <= 1 milliseconds 100.00% <= 1 milliseconds 88105.73 requests per second ====== SPOP ====== 100000 requests completed in 1.11 seconds 100 parallel clients 3 bytes payload keep alive: 1 42.64% <= 1 milliseconds 99.89% <= 2 milliseconds 99.90% <= 4 milliseconds 99.92% <= 5 milliseconds 100.00% <= 5 milliseconds 90090.09 requests per second ====== LPUSH (needed to benchmark LRANGE) ====== 100000 requests completed in 1.14 seconds 100 parallel clients 3 bytes payload keep alive: 1 46.04% <= 1 milliseconds 100.00% <= 2 milliseconds 100.00% <= 2 milliseconds 87950.75 requests per second ====== LRANGE_100 (first 100 elements) ====== 100000 requests completed in 4.64 seconds 100 parallel clients 3 bytes payload keep alive: 1 0.01% <= 1 milliseconds 2.07% <= 2 milliseconds 99.65% <= 3 milliseconds 99.96% <= 4 milliseconds 100.00% <= 4 milliseconds 21565.67 requests per second ====== LRANGE_300 (first 300 elements) ====== 100000 requests completed in 9.80 seconds 100 parallel clients 3 bytes payload keep alive: 1 0.00% <= 1 milliseconds 0.01% <= 2 milliseconds 0.09% <= 3 milliseconds 8.02% <= 4 milliseconds 56.57% <= 5 milliseconds 95.73% <= 6 milliseconds 99.88% <= 7 milliseconds 99.97% <= 8 milliseconds 100.00% <= 9 milliseconds 10206.16 requests per second ====== LRANGE_500 (first 450 elements) ====== 100000 requests completed in 13.50 seconds 100 parallel clients 3 bytes payload keep alive: 1 0.00% <= 1 milliseconds 0.01% <= 2 milliseconds 0.05% <= 3 milliseconds 2.07% <= 4 milliseconds 17.32% <= 5 milliseconds 37.14% <= 6 milliseconds 54.99% <= 7 milliseconds 73.80% <= 8 milliseconds 92.84% <= 9 milliseconds 99.52% <= 10 milliseconds 99.94% <= 11 milliseconds 99.98% <= 12 milliseconds 99.99% <= 13 milliseconds 100.00% <= 13 milliseconds 7409.60 requests per second ====== LRANGE_600 (first 600 elements) ====== 100000 requests completed in 17.67 seconds 100 parallel clients 3 bytes payload keep alive: 1 0.00% <= 1 milliseconds 0.01% <= 2 milliseconds 0.03% <= 3 milliseconds 0.04% <= 4 milliseconds 0.44% <= 5 milliseconds 5.83% <= 6 milliseconds 19.29% <= 7 milliseconds 35.08% <= 8 milliseconds 52.45% <= 9 milliseconds 71.43% <= 10 milliseconds 88.77% <= 11 milliseconds 98.23% <= 12 milliseconds 99.73% <= 13 milliseconds 99.93% <= 14 milliseconds 99.98% <= 15 milliseconds 99.98% <= 16 milliseconds 99.99% <= 17 milliseconds 100.00% <= 18 milliseconds 5658.03 requests per second ====== MSET (10 keys) ====== 100000 requests completed in 1.77 seconds 100 parallel clients 3 bytes payload keep alive: 1 1.92% <= 1 milliseconds 61.83% <= 2 milliseconds 99.23% <= 3 milliseconds 99.90% <= 5 milliseconds 99.94% <= 6 milliseconds 100.00% <= 6 milliseconds 56433.41 requests per second
可见,redis服务器的get和set操作每秒处理请求为86000,性能很高,LRANGE操作相比而言性能较低,和要操作的元素数量有关。
2. redis-stat
redis-stat host localhost port 6379 overview
Print general information about a Redis instance;
实时打印出host为localhost,端口为6379,redis实例的总体信息.
redis-stat host localhost port 6379 latencyMeasure Redis server latency;
输出host为localhost,端口为6379,redis服务中每个请求的响应时长.
相关推荐
`redis-monitor-master.zip`可能包含一个Redis监控工具,这可能是一个自定义的GUI或者命令行工具,用于实时查看Redis的运行状态,如内存使用、命令统计、网络流量等。解压后,按照工具提供的说明进行配置和使用,...
Prometheus 是一个流行的开源监控和警报工具,它在Linux环境中广泛用于系统和服务的性能监控。在运维领域,Prometheus 提供了强大的数据收集和查询功能,能够与各种服务(如Redis)集成,以实时监控服务的状态和性能...
在 IT 环境中,实时监控系统的健康状态和性能至关重要,尤其是对于像 Redis 这样的高性能内存数据存储。Redis Exporter 正是为了解决这一需求而诞生的。 首先,我们来了解一下 Redis。Redis 是一个开源的、基于内存...
2. **添加宏**:设置与Redis服务器相关的宏,如`{HOST.IP}`,`{REDIS_PORT}`等,以便在监控项中引用。 3. **导入监控项**:导入包含Redis监控项的XML模板,或者手动创建。监控项包括但不限于: - `Redis连接数` -...
部署监控工具可以对Redis实例的性能指标、内存使用、连接状态等进行实时监控。 ### 注意事项 在部署过程中,还需注意以下几点: - 如果需要让Redis在后台运行,则必须确保`daemonize`在配置文件中设置为`yes`,...
通过Nagios监控Redis,我们可以获取到Redis服务器的状态信息,包括但不限于连接数、内存使用情况、命令执行延迟等,以便及时发现并处理可能的性能问题或故障。 在提供的压缩包文件中,有两个主要的文件:`check_...
Zabbix则是一款开源的企业级监控解决方案,能够对各种IT基础设施进行监控,包括网络性能、服务器状态以及应用程序的健康状况。将Redis与Zabbix结合,可以确保Redis服务的稳定性和性能。 在“redis监控模板-配置-...
在微服务环境中,监控Redis的状态对于保证系统的稳定性和性能至关重要。 本资料包提供了Prometheus监控Redis的详细教程,包括部署文档和相关软件包,旨在帮助用户理解如何设置和使用Prometheus来监控Redis,并配置...
在IT行业中,管理和监控分布式系统,如Redis集群,是至关重要的任务。为了确保系统的稳定性,及时发现并处理问题,开发者通常会创建自动化监控脚本。本文将深入探讨如何使用Shell脚本来监控Redis集群节点,并在检测...
5. **监控与分析**: - Redis 自带的 `INFO` 命令可以获取服务器状态,包括内存使用、命令执行情况等。 - 使用监控工具如 RedisInsight、Prometheus 或 Grafana,实时监控 Redis 性能指标。 - 分析慢日志:通过 `...
本文主要给大家介绍了关于redis状态监控和性能调优的相关内容,分享出来供大家参考学习,下面话不多说了,来一起看看详细的介绍吧。 1、redis-benchmark redis基准信息,redis服务器性能检测 例如: 检测redis服务器...
Redis监控系统Redis-stat的离线安装是一个针对Redis数据库性能监控的重要步骤,对于系统管理员和开发者来说,能够实时了解Redis服务器的运行状态至关重要。本文将详细介绍如何在没有网络连接的情况下,通过离线方式...
解压后,你可以找到如`check_mysql-slave.sh`这样的脚本,用于监控MySQL主从复制的健康状况,包括检查主库与从库之间的复制延迟。此外,还可能有其他检查SQL查询性能、磁盘空间、连接数等的脚本。这些工具使系统管理...
1. **MySQL内置监控**:MySQL提供了一些内置的性能监控工具,例如`SHOW STATUS`和`SHOW VARIABLES`命令,可以查看服务器状态和配置参数。通过这些命令,你可以获取关于查询执行、连接数、内存使用等信息。 2. **...
4. **集成与扩展**:除了基本功能,`redis-stat` 还可能支持与其他监控系统(如 Prometheus、Grafana)的集成,以便进一步分析和报警。 在使用这个集成包时,你需要确保你的系统已经安装了 Java 运行环境,因为 `...
Zabbix提供了现成的Redis监控模板,包含了各种关键性能指标,如内存使用、命令执行速率、连接数等。步骤如下: 1. 在Zabbix服务器上安装Redis监控所需的Python模块(如`redis-py`)。 2. 配置Zabbix代理或服务器以...
### Windows环境下Redis高可用之主从复制与哨兵监控 #### 一、概述 随着分布式系统和微服务架构的普及,高性能、高可用性的数据库成为众多应用的基础需求之一。Redis作为一款广泛使用的开源键值存储系统,凭借其...
2. **节点状态监控**: 监控每个节点的健康状况,包括连接状态、CPU使用率、网络I/O等。这有助于识别并解决节点故障,保证服务的连续性。 3. **Keys分布查看**: 能够显示keys在集群中的分布情况,这对于理解数据分布...
对于动态监控Redis,除了使用`INFO`和`slowlog`命令外,还可以结合JMX(Java Management Extensions)来监控Java应用程序的运行状况,包括Redis客户端的连接状态和性能指标。通过注册MBean(Managed Bean),可以将...