Home  >  Article  >  Database  >  How much data can redis store

How much data can redis store

anonymity
anonymityOriginal
2019-06-05 09:41:1316570browse

Redis is a key-value storage system. Similar to Memcached, it supports relatively more stored value types, including string (string), list (linked list), set (set), zset (sorted set - ordered set) and hash (hash type). These data types all support push/pop, add/remove, intersection, union, difference, and richer operations, and these operations are all atomic. On this basis, redis supports various different ways of sorting. Like memcached, data is cached in memory to ensure efficiency. The difference is that redis will periodically write updated data to disk or write modification operations to additional record files, and on this basis, master-slave (master-slave) synchronization is achieved.

How much data can redis store

#How much data can redis store?

There is no such indicator. It's not a question of the number of records, but the actual capacity. Therefore, when configuring, you can:

Set the maxmemory option in redis.conf. This option tells Redis how much physical memory is used before starting to reject subsequent write requests. This parameter can be well protected. Your Redis will not cause swap due to the use of too much physical memory, which will eventually seriously affect performance or even crash.

Officially said that a single instance can handle keys: 250 million, Reference link: https://redis.io/topics/faq, the following is the original words:

What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a Hash, List, Set, Sorted Set?

Redis can handle up to 2^32 keys, and was tested in practice to handle at least 250 million keys per instance.

Every hash, list, set, and sorted set, can hold 2^32 elements.

In other words your limit is likely the available memory in your system.

The maximum size of a key or value is 512M

The above is the detailed content of How much data can redis store. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn