Squid cache on RAM drive: good thing and possible?

carmik

Member

Reaction score: 6
Messages: 35

Hello all,

my FreeBSD 11.4 box is working as a firewall (3 lan segments), dhcp/dns server and caching proxy with URL filtering (squid with squidGuard).

This is on "plain" hardware: just a i5 4570 with a single HDD. The 8gb squid cache is on a separate 10Gb partition, to minimize UFS corruption.

I've been thinking: this box has 8Gb of RAM, mostly unutilized. Would it be a good idea to have a RAM disk on each boot, say 6Gb, and host the squid cache on it? If so, would squid create the initial cache subdirectories for that feat or should I somehow cater for it?

Goal:
* minimize hdd wear and, hence, possibilities of mechanical failure
* minimize times to read / write data to/from disk cache on cache hits/misses, respectively

Assumptions:
* losing cache at each startup is no biggie: this system has an uptime of months. And since most sites are secure http nowadays, no info gets cached anyways...

Thanks in advance for any info provided.
 

diizzy

Aspiring Daemon

Reaction score: 235
Messages: 638

No, tune squid (if needed) and you already have file system caching so you're just over-engineering your setup.
 
OP
C

carmik

Member

Reaction score: 6
Messages: 35

Thanks for the info, I'll leave things as they are then.
 
Top