Hi All, this document shows you how to allocate maximum memory for the Redis server.
Redis is a “source-available” in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, hyperloglogs, bitmaps, streams, and spatial indexes
* Redis installed Server, if not check this link to achieve.
Memory can be allocated using 2 different methods, one is from redis-cli and another one from the configuration file.
Step 1: Login to the Redis server, and enter the redis cli using the below command,
Step 2: Once you are in redis cli enter the below command to check the current maximum memory allocated to redis service.
Step 3: Now you can see the maximum memory allocated to the Redis server is 0MB, so let’s increase the memory. In order to increase the maximum memory enter the following command in Redis cli.
Now you can see 100mb of memory is allocated to your service.
In method 2, allocation of memory is done through the configuration file redis.conf
Step 1: Edit/ADD the below entry with required size to allocate memory for Redis server.
Step 2: Once you added the memory in the configuration file, its required to restart the service of Redis server. Execute the below command to perform this.
Step 3: Now login to Redis cli and check the memory allocated.
© 2019, Techrunnr. All rights reserved.