Skip to main content

Posts

Showing posts with the label redis

Redis installation in Red Hat Linux

 In this post we will see step by step installation of Redis service in Redhat/CentOS operation system. To install Redis, run this command in terminal -dnf install redis This command will install the redis service in your machine. Verify installation -systemctl status redis -systemctl start redis -systemctl enable redis Note: Before start redis service set Linux Kernal overcommit memory to 1 by adding vm.overcommit_memory = 1 to /etc/sysctl.conf file. Why we should do that: As we know redis is in memory data store. It primarily uses RAM to store data. Redis and other processes use RAM memory. We set vm.overcommit_memory = 1 to make sure Kernal not overcommit the memory by allocating memory to new program which required more memory than available memory. In this scenario OOM (Out Of Memory) killer terminate the rest of processes. We also restricting Kernal not to terminate the important services running and also stop swapping redis and other importance service to device i/o device,...

Redis

 What is Redis? Rdis is a database, most specifically it is NoSql database. Definitely not similar to other NoSql databases like Mongos and NoSql. Note that redis don't have idea of tables and documents. All data stored in key values pairs in JSON format. Other Databases run in disk but redis run/ work in RAM thats why it is incredibly fast. It run on top of other traditional databases. Fastly to get data from it. This storage is not persistance storage mean dta lose if system crash or turn off, therefore is is use for caching.  Before start redis service in redis Before start redis service set Linux Kernal overcommit memory to 1 by adding  vm.overcommit_memory = 1  to  /etc/sysctl.conf  file. Why we should do that: As we know redis is in memory data store. It primarily uses RAM to store data. Redis and other processes use RAM memory. We set vm.overcommit_memory = 1 to make sure Kernal not overcommit the memory by allocating memory to new program which requ...