Skip to content

Create Script to find Top N keys by Used Memory #19

Open
sripathikrishnan opened this Issue Dec 3, 2012 · 3 comments

3 participants

@sripathikrishnan
Owner

A very frequent use case is finding top N keys by memory usage. For small databases, this is easily achieved by taking the csv file and sorting out.

But for databases with more than 64K keys, the csv approach fails because excel cannot handle that many rows.

The solution is to have a script that does a linear pass of all keys, maintain the top N keys by memory usage, and then finally print that out. Perhaps we could also maintain some more statistics as well.

See discussion on this over here - http://stackoverflow.com/questions/13673058/what-is-the-easiest-way-to-find-the-biggest-objects-in-redis/13681596#comment18794833_13681596

@manuelmeurer

I'm using Zoho for opening and sorting the CSV file now, after even Google Docs said the file was too big (their limit is 400,000 cells and 20MB). Zoho hasn't complained yet.

@alonisser

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.