Osiris X wrote:
Wouldn't your squid cache benefit from being persistent over reboots? I'm guessing that after a reboot, using tmpfs would mean that it takes a significant amount of time to re-populate and optimise.
Not really.
It pains me to say this as someone whom used to do web caching as a full-time job, but in the web 2.0 world caches are almost useless. We see less than a 10% bandwidth saving from our current implementation. Too much streaming and dynamic content these days.
Caches still help for a myriad of reasons, but its usually during the flash crowd kind of scenarios. So having a persistent storage doesn't buy you much. Plus I don't plan on bouncing the box more than once a week, tops.
Quote:
Would I be correct in assuming that the reason you are not using tmpfs for the havp temp directory is because it doesn't support mandatory locking?
Tmpfs + mandatory locking is technically supported, it just doesn't work consistently with havp for some reason. I looked into it and its some sort of exotic race condition I really don't feel like debugging. A ramdisk works fine if you want that, but it has to be statically sized at boot. You can also use a loopback file and keep it in tmpfs, which works as well. But I worry about the overhead.
I have squid configured to whitelist all the heavy the content, so only a small % is getting scanned. Given the aggressive buffering the linux kernel does plus my filesystem tweaks I don't expect the disk is being touched much, if at all. So far the disk seems mostly idle with my current configuration, so I'm happy.
Quote:
I wonder what other directories would benefit from using tmpfs?
GNOME, Clamav & MySQL use /tmp by default.
I will certainly try using tmpfs for P3Scan temp dirs /var/spool/p3scan/children & /var/spool/p3scan/notify.
Any other ideas for temp dirs to try tmpfs with? Apache2?, lighttpd?, dhcp?, bind?, samba? ......
I build all my boxes the same way, tons of ram, no swap and tmpfs for /tmp and /var/tmp (+/var/spool/squid on the web caches). I have scheduled reboots to keep 'em clean, amongst other things.
Any scratch work is much faster via tmpfs, if you have the free memory to pull it off. Portage builds are much faster, for example.