Using TempFS for Magento's var folder

If your disk is slow or you don't want to use Redis or Memcached to store your Magento cache you can simply move your var folder into the RAM of your server.
created by on 2014-05-20

Assuming your Magento root folder is /var/www/sites/core you can either edit your /etc/fstab file:

tmpfs	/var/www/sites/core/var 	tmpfs 	size=1G		0 0

Screenshot: fstab with a tempfs entry

or move the “var”-folder on-the-fly into RAM using mount:

sudo mount -o remount,size=1G /var/www/sites/core/var

Links

http://en.wikipedia.org/wiki/Tmpfs
http://wiki.centos.org/TipsAndTricks/TmpOnTmpfs

Tags:
Fork allmark on GitHub