Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis - How to completely flush/clear memory after a flushdb?

Tags:

redis

After doing several flushdb on a Redis database, I wonder how to completely flush/clear the memory use ?

Indeed, I made some tests :

  • watching memory with a htop -> 800 Mo used
  • fill in a Redis database -> goes to 1500 Mo used
  • flushing the database => memory use stay at about 1500 Mo...

Any ideas ? Thanks

like image 786
kozher Avatar asked Jul 01 '11 08:07

kozher


People also ask

How do I flush all in Redis?

To clear data of a DCS Redis 4.0 or 5.0 instance, you can run the FLUSHDB or FLUSHALL command in redis-cli, use the data clearing function on the DCS console, or run the FLUSHDB command on Web CLI. To clear data of a Redis Cluster instance, run the FLUSHDB or FLUSHALL command on every shard of the instance.

How do I refresh Redis cache?

How do I flush my Redis cache using the Linux/Unix command line option? What is the command to delete all keys from my redis cluster? FLUSHDB command – Delete all the keys of the currently selected DB. FLUSHALL command – Remove all the keys of all the existing databases, not just the currently selected one.

Does Redis keep everything memory?

All Redis data resides in memory, which enables low latency and high throughput data access. Unlike traditional databases, In-memory data stores don't require a trip to disk, reducing engine latency to microseconds.


1 Answers

Try using flushall

like image 121
intellidiot Avatar answered Sep 20 '22 17:09

intellidiot