max number of hash key 2^23 ?

72 views
Skip to first unread message

roboti...@gmail.com

unread,
Feb 24, 2019, 5:05:01 AM2/24/19
to Redis DB
As i read the redis documentation, it says the maximum number key value pair it can save in database is 2^23 of data type string. Does it really means that i can save 2^23 items in the redis db ? right now i'm using redox since i'm using c++, does that implies with redox also ? While using redis db since it uses ram, will it now affect performance of other ram intensive applications like simulators and grapchic intensive applications?

hva...@gmail.com

unread,
Feb 24, 2019, 7:09:13 AM2/24/19
to Redis DB
I can't find the 2^23 figure you quote.  Can you give the URL?

What I can find is where the Redis FAQ (https://redis.io/topics/faq) says:

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 232 keys, and was tested in practice to handle at least 250 million keys per instance.

Every hash, list, set, and sorted set, can hold 232 elements.

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


2^23 is only 8 million, which is far less than the figures given in the FAQ.

Yes, if you fill up your computer's memory with Redis data, other software that needs to use memory would suffer.  This is one of the advantages of cloud computing services like AWS - you can create a server that's dedicated to Redis, and the Redis memory consumption won't conflict with other applications.  (you have to leave a little memory unused for the operating system to function properly, though)

Will rodox have the same limitations?  I don't see anything in the project's README.md to suggest it has different limitations than the Redis database it reads/writes.  Have you noticed the last couple of paragraphs in that README.md file?  The project also hasn't had a substantive code commit since mid-2016.  It kind of looks like the project has become dormant.  Maybe another C++ client would work better for you.
Reply all
Reply to author
Forward
0 new messages