27 Jun

Magento tmpfs RamDrive var/cache and var/sessions

Pretty straight forward.

First important is to check which user / group has the current permission, no point of loading a ram drive if magento can’t write to it.

so

cd /home/magento/var/

then perform ls -a
Should give you a basic view of the current owner.
Now, we can create our tmpfs drives.

mount -t tmpfs -o size=128m tmpfs /home/magento/var/cache/

then

chown user:group (in mycase nobody:nobody) /home/magento/var/cache
chmod o+w /home/magento/var/cache

Perform the same for /var/sessions

Their you go, you now have a SuperFast MageCache :-)

Only downside if you reboot you shall have to remount them, otherwise you can add them to you /etc/fstab

Share this

Leave a reply

Leave a Reply