Optimizing squid

I would like to optimize our squid server setting in our school.
This is first what I do:
1. change the cache_dir to another partition. So it will have big room 😀
look at the squid.conf in /etc/squid/squid.conf
find the line of cache_dir from
cache_dir ufs /var/spool/squid 100 16 256

into
cache_dir ufs /mnt/sda6 3000 16 256

3000 means 3Gb. I have 4Gb size. So I use 75% its size so it will not too slow. 16 means 16 first level directory of cache, and 256 is the number of second level sub directory of cache.

But be careful, the processor and memory speed are important here. Don’t let it slow down the caching process.

2. Rotate the squid regularly, let’s say once in a month with this command.
I will put the command in cron.monthly
squid -k rotate

So your squid will always fresh. I hope.
My computer spec for server is
IBM motherboard 3PL, with Pentium 3 450, memory 128Mb and 10Gb harddisk. 6 Gb for ubuntu server 8.10 and 4Gb for cache squid. And We have 26 clients.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.