Get the App
SLTechnology News&Howtos  ›  Database  › 

How much redis cache data can be cached at most

Shulou Source: shulou.com Published: 2022-06-01 12:07:05 11月15日 Update

Today, I will talk to you about how much redis cache data can be cached at most. Many people may not know much about it. In order to let you know more, Xiaobian summarizes the following contents for you. I hope you can gain something according to this article.

Redis is playing an increasingly important role in distributed applications. With just tens of thousands of lines of code, it implements a high-performance data storage service.

Looking at redis source code, we found that redis will timeout in some cases, as follows:

1. Network. The processing of Redis is closely related to the network. If the network flashes, it is easy to cause redis timeout. If this situation occurs, first check the redis machine network bandwidth information to determine whether there is a flash failure.

2. Memory. All redis data is stored in memory. When physical memory is not enough, Linux OS will use swap memory, causing memory swap to occur. At this time, if there is a redis call command, redis timeout will occur. Here you can adjust the/proc/sys/vm/swap parameter to set how much physical memory will be used to swap.

Maximum cache settings

Example: maxmemory 100mb

Units: mb,gb.

Default is 0, no maximum cache specified, if there is new data added, more than the maximum memory, it will make redis crash, so one point to set.

After maxmemory is set, the cache data recycling policy should be set accordingly.

After reading the above, do you have any further understanding of the maximum amount of redis cache data you can cache? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

Tags: Cache memory data network maximum content condition situation physics important closely related insufficient code information distributed unit parameter can pass command status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi NVidia Shulou Technology Apple