IPCop Squid

Associate
Joined
27 Apr 2004
Posts
2,377
// Background, I typed it out then realised it's unneccesary and boring
I'm looking into replacing my current router, as this one has started crashing, I reckon on average about once a day, sometimes more. This started since I moved from a single to multiple public IPs, and so I'm theoreticising that the problem is due to the lack of memory and it filling up. I've decided that I'm not going to touch SOHO kit again, since this is the 2nd router I've had now with the exact same problem. Thus I plan/hope to build a Mini-ITX IPCop system.

I'm just thinking it through first, and my priority is silence and efficiency. Thus I don't want to use a hard disk and so instead am looking at using Compact Flash. I'm aware that compact flash is of course slower, and I also think I heard somewhere that it's unhealthy for flash memory to be read/written to many times.

// Actual question
If I was using IPCop, I would want to make use of the Squid Cache. However, I wouldn't want it to be using the disk as a cache and instead would prefer it to create a cache in RAM, since this would avoid risking damaging the CF card, and would presumably give much faster access times. Assuming it wouldn't cause any software problems I don't care that the cache would be lost in a power cut. My question is this; is it possible to set IPCop to store the cache in RAM not on disk?

Thanks, null :)
 
Associate
OP
Joined
27 Apr 2004
Posts
2,377
Looks good but I thought I read somewhere that Squid has support for RAM caches built in. Would this not be a better option, and also perhaps require less modification - correct me if I'm wrong but using a ram disk would require modification of Squid anyway, to update the cache directory? Bear in mind I never get on well with Linux so want to keep it as simple as possible while still getting the functionality.
 
Soldato
Joined
18 Jan 2006
Posts
3,101
Location
Norwich
Urgh, the questions :p (Never tried Squid)
A quick bash on Google brings up this:
https://www.redhat.com/archives/fedora-list/2005-April/msg01818.html
Basically, use
Code:
/var/spool/squid
as the mount point for the ramdisk, and then run
Code:
restorecon -Rv /var/spool/squid
to restore Squid's connection to the cache.

You probably also want to have a read of this:
http://www.linux.com/article.pl?sid=06/01/03/1728227 for a decent tutorial on how to set this process to run automatically at boot.

Hope this helps.

-Leezer-
 
Associate
OP
Joined
27 Apr 2004
Posts
2,377
Ok thanks. I just wanted to know how difficult it would be to do really, and that seems to answer that so thanks :)

Now I just have to persuade my parents to pay for the mini-itx system... fat chance of that happenening, and I can't really afford it myself right now :(

Will have to keep an eye out for spare PCs so I can try IPCop out...
 
Back
Top Bottom