How to calculate how much RAM redis needs?

Viewed 9216

I am going to use Redis as a cache to reduce requests to database.
I know this is not a question with an explicit answer but I am worried about the size of RAM Redis needs.

I am going to save 10 million integer number in some redis sets. ( some for user IDs, some for Album IDs, ... ) and 2 million string with 30 chars length.

In MYSQL way: an int is 4byte, So 10 million * 4 = 40 million bytes.
and a string with 30 character can take 30bytes, 30byte * 2 million = 60 million bytes.

So on paper, I need 100MB to store these in redis, but I know in REAL, it can be different.

Can someone help me to estimate how much RAM do I need?

1 Answers
Related