Memcached is a high performance distributed memory caching system. Memcache is mainly used to speed up web application by reducing the database load.
Memcached stores data objects in dynamic memory, due to which whenever a request is sent to the database, memcached renders the contents stored within it. This results in the speeding of the web application.
The default memory allocated to Memcached object storage is 64MB. The configuration file of memcache is in the path /etc/sysconfig/memcached
# set ram size to 2048 – 2GiB
For some linux distros the location is different and is available at /etc/init.d/ with the file name memcached
# set ram size to 8M Bytes to 256M Bytes
The command to update the memory value is
$ memcached –m 3072
Note: Memory size should not be larger than the available RAM. If we specify a memory size larger than the RAM, memcacheduses swap space and not physical RAM. This would finally lead to some delay in storing and retrieving values as the data is swapped to the disk instead of storing the data directly in the RAM.
At Velan, our server support engineers can help you with memcached memory on your server. We troubleshoot problems like these for our clients every day. If you are interested in our service, please fill the Quick connect form to get in touch with us.