How to set and get REDIS maximum memory size in Ubuntu?
I have a small VPS server install Ubuntu 18. I Installed Redis and deploy the website on that server. I don't know default what's default maximum RAM for Redis. And now I want to limit it to 400MB.
How can I get the current config maximum RAM for Redis and set it to 400MB?
Thanks for any suggestions.
Blue Jame Mar 08 2021
To check the max size memory configure for Redis you have to access inside Redis server by command
1. To get the current max memory size, you can use the command below:
config get maxmemory
127.0.0.1:6379> config get maxmemory 1) "maxmemory" 2) "1000000000" 127.0.0.1:6379>
2. To set max memory size for Redis. For example, set to 400MB using the command below:
config set maxmemory 400M