当前位置:网站首页>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
边栏推荐
- Deep learning notes - semantic segmentation and data sets
- Uglifyjs compress JS
- Other problems encountered in debugging fingerprints
- DIY 一个 Excel 版的子网计算器
- This call when the transaction does not take effect
- Innovation training (VI) routing
- Learning Android V from scratch - UI
- 【数据库】MySQL多表查询(一)
- [2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测
- A trinomial expression that causes a null pointer
猜你喜欢

数据安全问题已成隐患,看vivo如何让“用户数据”重新披甲

Innovation training (V) configuration information

DIY 一个 Excel 版的子网计算器

直播带货表格模板-自动显示图片-自动关联系列商品

MySQL slow query

Deep learning notes - fine tuning
![[winui3] Écrivez une copie du gestionnaire de fichiers Explorer](/img/3e/62794f1939da7f36f7a4e9dbf0aa7a.png)
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer

Deep learning notes - object detection and dataset + anchor box
![[winui3] write an imitation Explorer file manager](/img/3e/62794f1939da7f36f7a4e9dbf0aa7a.png)
[winui3] write an imitation Explorer file manager

独立站运营 | FaceBook营销神器——聊天机器人ManyChat
随机推荐
QPushbutton 槽函数被多次触发
Innovation training (V) configuration information
[database] MySQL single table query
View, modify and delete [database] table
《2021多多阅读报告》发布,95后、00后图书消费潜力攀升
Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
[2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测
Agile practice | agile indicators to improve group predictability
Detailed explanation of hregionserver
深度学习笔记 —— 微调
Progress of innovation training (IV)
[database] MySQL multi table query (I)
Leetcode 1547: minimum cost of cutting sticks
MySQL 慢查询
Innovation training (II) task division
数据安全问题已成隐患,看vivo如何让“用户数据”重新披甲
Analysis of POM files
C# List字段排序含有数字和字符
AQS source code reading
MySQL - index