Thursday, June 18, 2015

memory is ram!

I had an issue where a webserver should have been running smoothly using normal disk cache. After pulling my hair out for a while I finally gave up and just moved the cache folder to tmpfs. That cleared everything up.

edit your fstab and add the following:

tmpfs                       65536      284     65252   1% /var/www/vhosts/example.com/cache/


#ls /var/www/vhosts/example.com/cache/
285ea04ebb783e7c264410b1923e156b-cache-1b382f33e05a11af6e176df12538375d.php
285ea04ebb783e7c264410b1923e156b-cache-21adf12cddf084aff54d581b7a245bee.php
285ea04ebb783e7c264410b1923e156b-cache-3165fb29750dc77e8b1c72c5c6ab701d.php
285ea04ebb783e7c264410b1923e156b-cache-6c80b5246d1d6a5a733ecf21ec8f5c45.php
285ea04ebb783e7c264410b1923e156b-cache-de57dad4255b001ebe0a55d7d2bcdefd.php

#df -h
tmpfs                     64M  284K   64M   1% /var/www/vhosts/example.com/cache/

No comments:

Post a Comment