Redis Max Size of Every Type

本文介绍了Redis中字符串、列表、集合、有序集合等数据类型的内存限制,以及单实例最大键值数量,并提供了实际测试结果。
via http://blog.sina.com.cn/s/blog_3c8ced5801012iyt.html
Strings

A String value can be at max 512 Megabytes inlength. Redis Strings are binary safe, this means that a Redisstring can contain any kind of data, for instance a JPEG image or aserialized Ruby object


Lists

The max length of a list is 232 - 1 elements(4294967295, more than 4 billion of elements per list).


Sets

The max number of members in a set is 232 - 1(4294967295, more than 4 billion of members per set).


Hashes

Every hash can store up to 232 - 1 field-value pairs(more than 4 billion).


Sortedsets

Redis Sorted Sets are, similarly to Redis Sets, non repeatingcollections of Strings. The difference is that every member of aSorted Set is associated with score, that is used in order to takethe sorted set ordered, from the smallest to the greatest score.While members are unique, scores may be repeated.

 

 

What is the maximum number ofkeys a single Redis instance can hold? and what the max number ofelements in a List, Set, Ordered Set?

In theory Redis can handle up to2^32 (4 bilions)keys, and was tested in practice to handle at least250 million of keys per instance. We are working in order toexperiment with larger values.

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

In other words your limit islikely the available memory in your system.

 

http://redis.io/topics/faq

http://redis.io/topics/data-types
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值