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.

Forge
  • 6,538
  • 6
  • 44
  • 64
  • 2
    You may try with https://github.com/gamenet/redis-memory-analyzer. It supports LIST so you may get memory statistic about you data. – Nick Bondarenko Mar 14 '16 at 12:38

1 Answers1

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.

Itamar Haber
  • 47,336
  • 7
  • 91
  • 117