Memcached is a configurable memory object caching daemon that stores objects in memory to reduce database load in dynamic web applications.
It’s built on top of libevent to grow to any size, and it’s specially designed to minimise swapping and utilise non-blocking I/O wherever possible.
Memcached is high performance in memory cache system that is useful to speed up websites which used heavy database. Memcached support many programming languages like PHP,Ruby,Python,Perl.
Install Memcached :
- Clean up yum
[root@linuxsysad ~]# yum clean all
- Update yum packages
[root@linuxsysad ~]# yum update
- Install Memcached Package.
[root@linuxsysad ~]# yum -y install memcached
- Start Memcached service:
[root@linuxsysad ~]# systemctl start memcached
- configure to start memcached service at boot time.
[root@linuxsysad ~]# systemctl enable memcached
Configure memcached :
The default configuration file can be found at:
/etc/sysconfig/memcached
When started, Memcached will start on port 11211 by default as per the default configuration file:
PORT=”11211″
USER=”memcached”
MAXCONN=”1024″
CACHESIZE=”64″
OPTIONS=””
CACHESIZE is default set in MB. For example we set CACHESIZE=”64″ means it is 64 MB.