惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
V2EX - 技术
V2EX - 技术
B
Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
W
WeLiveSecurity
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threatpost
小众软件
小众软件
T
The Blog of Author Tim Ferriss
Google Online Security Blog
Google Online Security Blog
MongoDB | Blog
MongoDB | Blog
T
Tenable Blog
P
Privacy International News Feed
S
Security @ Cisco Blogs
H
Heimdal Security Blog
大猫的无限游戏
大猫的无限游戏
B
Blog RSS Feed
H
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
Security Latest
Security Latest
S
Securelist
Cyberwarzone
Cyberwarzone
D
Docker
S
Schneier on Security
V
Vulnerabilities – Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy & Cybersecurity Law Blog
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 陈惟鲜的博客

AI软件修改脚本与代码,还真不敢完全操作 linux 磁盘满了,排查 Ecelipse 安装 MAT linux 增加新磁盘 prometheus监控mysql数据库 prometheus监控springboot项目配置 监控工具prometheus配置-docker版 linux 文件属性被替换修改查询并修改 ----i----------- ZonedDateTime 转为 java.util.Date docker 容器查看jvm参数配置 redis 事务处理,一旦异常,则回滚 linux 下安装使用jmeter 执行压测 大批量订单来了由于入库慢,先缓存后通知入库 eclipse 合并错分支代码还原,合并到本分支但未push到库上 mysql 查询jason格式数据 maven打包慢,使用maven-mvnd 打包可以快一半 postman 参数化构建 批量测试 postman 常用参数例子 使用AOP实现+自定义注解 实现 缓存 如何判断redis慢了
redis自身查询很慢 排查redis-benchmark
陈惟鲜的博客 · 2024-09-26 · via 博客园 - 陈惟鲜的博客

redis-benchmark 是一个用于测试 Redis性能的基准测试工具,可以帮助开发人员评估和比较 Redis 在不同配置或负载情况下的吞吐量和延迟。

通过 redis-benchmark 的测试结果,你可以获得qps、平均延迟、错误率等性能指标,从而根据需要进行调优和优化,确保Redis在实际生产环境中具有良好的性能和可靠性。

(1)、查询启用100个并发,发100000个请求。 

  redis-benchmark -h 127.0.0.1 -p 6379 -c 100 -n 100000 

-h 127.0.0.1:指定 Redis 服务器的主机地址为 127.0.0.1,即本地主机。
-p 6379:指定 Redis 服务器的端口号为 6379,默认情况下 Redis 使用 6379 端口。
-c 100:指定并发连接数为 100,即同时并发地执行操作。
-n 100000:指定执行操作的总次数为 100,000 次。

测试如下:1.2秒就完成了100000次请求,每秒83056的吞吐量,说明Redis本身的性能就非常好。这是最常用的命令,可以评估 Redis 在指定条件下的并发处理能力和性能表现。

[root@h252 system]# docker exec -it redis bash
root@fe4213597697:/data# redis-benchmark -h 127.0.0.1 -p 6379 -c 100 -n 100000 
ERROR: NOAUTH Authentication required.
ERROR: failed to fetch CONFIG from 127.0.0.1:6379
WARN: could not fetch server CONFIG
====== PING_INLINE ======
  100000 requests completed in 1.20 seconds
  100 parallel clients
  3 bytes payload
  keep alive: 1
  multi-thread: no

0.00% <= 0.3 milliseconds
0.01% <= 0.4 milliseconds
8.10% <= 0.5 milliseconds
48.45% <= 0.6 milliseconds
86.64% <= 0.7 milliseconds
99.22% <= 0.8 milliseconds
99.67% <= 0.9 milliseconds
99.72% <= 1.0 milliseconds
99.75% <= 1.1 milliseconds
99.78% <= 1.2 milliseconds
99.80% <= 1.3 milliseconds
99.82% <= 1.4 milliseconds
99.83% <= 1.5 milliseconds
99.84% <= 1.6 milliseconds
99.85% <= 1.7 milliseconds
99.86% <= 1.8 milliseconds
99.87% <= 1.9 milliseconds
99.89% <= 2 milliseconds
100.00% <= 2 milliseconds
83056.48 requests per second

(2)、设置输入命令:redis-benchmark -n 100000 -q script load "redis.call('set','chen','weixian')"

-t set,lpush:指定要执行的命令类型。在本例中,将同时执行 SET 和 LPUSH 命令,即将键值对设置到 Redis 中,并将元素推入列表。
-q:指定以静默模式运行基准测试,只输出总结结果,不显示每个操作的详细信息。
-n 100000:指定执行操作的总次数为 100,000 次。