2

I'm storing a very large list of strings in Redis and I'm trying to figure out if there is a command (or any other way) to get the memory used by that list. Any suggestions?

I went over the list of Redis commands by couldn't find anything relevant.

1

1 Answer 1

2

Currently Redis doesn't provide this type of introspective memory abilities. Your best bet at the moment is to DUMP the list and then RESTORE it to an empty database. Use INFO's memory section from target database before & after restoring the list and subtract the former from the latter to get the size estimate.

Sign up to request clarification or add additional context in comments.

2 Comments

I see, toda @ItamarHaber. I just now noticed this very similar thread, but I will leave the question open for this answer.
@Forge ein be'ad ma ;)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.