当前位置:网站首页>Redis lost key and bigkey
Redis lost key and bigkey
2022-04-23 05:04:00 【canger_】
lose key ( Cache pollution
- The phenomenon : There are always redis-key Lost situation , Yesterday's key Not today
- Investigation angle :
- 1、key Whether to set the expiration time
- 2、 Check key Delete logic
- 3、 see redis Whether the memory used in is close to maxmemory, Causes the memory obsolescence policy to be triggered
- If this is the third case , Set according to the business scenario config
- modify redis-config
- modify maxmemory
- modify maxmemory-policy from allkeys-lru Change it to volatile-lru
- See what key It takes up a lot of memory (bigkeys screening ), And see if the timeout is set
- modify redis-config
bigkeys
bigkeys:hash/set/zset There are a lot of elements in ,string The data stored is very large
- harm :
- 1、 Blocking 、redis It's single threaded , Yes bigkeys The operation of will cause blocking of other commands , Lead to a large number of redis A series of problems such as operation exceeding and reporting errors
- 2、 Be overdue / When deleted, it will block , If it is redis4.0 Later versions , Asynchronous deletion can be used to solve (lazy-free/unlink)
- 3、 Memory is unevenly distributed , For example redis-cluster It will cause uneven use of node memory , Increase the processing pressure of a single instance
- screening bigkeys Methods :
- 1、redis-cli --bigkeys
- 2、 Use open source tools ,redis-rdb-tools To analyze redis Of key Distribution situation https://github.com/sripathikrishnan/redis-rdb-tools
rdb --command json dump.rdb
- resolvent :
- Optimize storage solutions
- bigkey Split , Fragmentation storage
- Save to database
- Set expiration time, etc
- Optimize storage solutions
版权声明
本文为[canger_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220552063226.html
边栏推荐
- Using MySQL with Oracle
- Knowledge points sorting: ES6
- Define defines constants and macros, pointers and structures
- Learning Android from scratch -- baseactivity and activitycollector
- Chapter II project scope management of information system project manager summary
- [WinUI3]編寫一個仿Explorer文件管理器
- Details related to fingerprint payment
- The 2021 more reading report was released, and the book consumption potential of post-95 and Post-00 rose
- Innovation training (VI) routing
- Deep learning notes - object detection and dataset + anchor box
猜你喜欢
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
[winui3] write an imitation Explorer file manager
Restful toolkit of idea plug-in
[WinUI3]編寫一個仿Explorer文件管理器
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer
[WinUI3]编写一个仿Explorer文件管理器
Customize the navigation bar at the top of wechat applet (adaptive wechat capsule button, flex layout)
深度学习笔记 —— 微调
Sword finger offer: the median in the data stream (priority queue large top heap small top heap leetcode 295)
2022/4/22
随机推荐
[WinUI3]编写一个仿Explorer文件管理器
Informatics Olympiad 1955: [11noip popularization group] Swiss round | openjudge 4.1 4363: Swiss round | Luogu p1309 [noip2011 popularization group] Swiss round
Use AES encryption - reuse the wisdom of predecessors
PHP+MySQL 制作留言板
持续集成(CI)/持续交付(CD)如何彻底改变自动化测试
MySQL uses or to query SQL, and SQL execution is very slow
leetcode——启发式搜索
C. Tree Infection(模拟+贪心)
Deep learning notes - semantic segmentation and data sets
SCP command details
信息学奥赛一本通 1955:【11NOIP普及组】瑞士轮 | OpenJudge 4.1 4363:瑞士轮 | 洛谷 P1309 [NOIP2011 普及组] 瑞士轮
Innovation training (II) task division
2022/4/22
Progress of innovation training (III)
#define 定义常量和宏,指针和结构体
信息学奥赛一本通 1212:LETTERS | OpenJudge 2.5 156:LETTERS
退出vim的方法
和谐宿舍(线性dp / 区间dp)
Graduation project
Luogu p2731 horse riding fence repair