Hello guys, Maybe someone can help me... I was getting some errors because my tmp partition was always full since I installed mod_pagespeed in my server. I contacted an SysAdmin company and they increase tmp partition to 1G but without success. Than they increased to 2G and the problem continues... Today, I asked for a permanent fix because I cant have my websites always down because of this. The solution that they gave me was: But doing that, will not affect my server speed performance? I searched and I have found this: ---------------------------------- mysql: Shall I change the mysql tmpdir from /tmp to /var/lib/mysql/tmp? This is not recommended. By default, /tmp will be mounted out of tmpfs and mysql will use this for extra large queries etc. Being in tmpfs means IOPS hit RAM instead of your hard drive or SSD. This improves performance and there is no real downside because the data being stored in the tmpdir is suited to volatile storage. If you are maxing out the size of your /tmp, I would recommend you write your queries to be more efficient or enlarge the size of your /tmp through fstab if you have the RAM to spare. If this solution does not work, then feel free to define your own location of tmpdir and point it towards a disk with a larger partition allocation. ---------------------------------- Or am I understand this wrong and wasn't what he did? Is this safe? What method is more faster? Because server speed is very important for me. I asked this to them and they said: What do you guys think? Thanks
I might look at tuning the cache options a bit https://developers.google.com/speed/pagespeed/module/system#file_cache
Hello, There are two options. Relocate the /tmp directory to a larger partition. Run a cron that will clean the sess_* files and cache_* files regularly. This links will help. --- http://prefetch.net/blog/index.php/2009/05/01/automating-temporary-file-cleanup-with-tmpwatch/ https://forums.cpanel.net/threads/cron-to-clean-tmp.203701/ ---- This is the cron job. --- 0 */4 * * * /usr/sbin/tmpwatch -am 12 /tmp ---- Let me know if that helped.
you need to check why and what is filling the tmp space, the cleanup is not a solution to your problem just a shortcut