Hi there,
Why not make use of some of your RAM for cache_mem? It will make requests
for smaller, more frequently requested files a hell of a lot quicker, and it
should give you a better hit ratio.
# 3GB process size limit in 32bit, so don't set higher than 1 GB for a very
busy cache
cache_mem 512 MB
maximum_object_size_in_memory 2048 KB
A few refresh_patterns to get images and other static content in cache for
longer:-
refresh_pattern \.jpg$ 3600 50% 60 ignore-reload
refresh_pattern \.gif$ 3600 50% 60 ignore-reload
refresh_pattern \.css$ 3600 50% 60 ignore-reload
refresh_pattern \.js$ 3600 50% 60 ignore-reload
# Cache all html for 5 minutes
refresh_pattern \.html$ 300 50% 10 ignore-reload
After the first time an image is loaded into cache you should see
'TCP_MEM_HIT' or 'TCP_HIT' in your logs until it expires (after 1 hour), at
which point the image will be downloaded from the origin web servers.
Give it a go, the refresh patterns should definitely help with caching.
ant2ne wrote:
>
> I got this 1TB drive and mounted it as /cache. I want to cache everything
> and anything and keep it until it is outdated.
>
> Webmin | Servers | squid | Cache
> has cache directories set to "/cache" and Size (MB) set to "500000" (the
> rest set to default)
>
> administrator_at_AHSPX01:~$ df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/sda1 72G 1.2G 67G 2% /
> varrun 2.5G 184K 2.5G 1% /var/run
> varlock 2.5G 0 2.5G 0% /var/lock
> udev 2.5G 40K 2.5G 1% /dev
> devshm 2.5G 0 2.5G 0% /dev/shm
> /dev/sdb1 917G 1.1G 870G 1% /cache
> administrator_at_AHSPX01:~$ ls -l /cache
> total 5220
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 00
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 01
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 02
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 03
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 04
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 05
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 06
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 07
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 08
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 09
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0A
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0B
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0C
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0D
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0E
> drwxr-x--- 258 proxy proxy 4096 2009-07-15 14:11 0F
> drwxr-x--- 2 proxy proxy 16384 2009-07-15 11:01 lost+found
> -rw-r----- 1 proxy proxy 5247120 2009-09-21 14:32 swap.state
> -rw-r----- 1 proxy proxy 0 2009-09-21 06:30 swap.state.last-clean
>
> There is currently about 100 computers using this cache proxy. I intend to
> add another 200. I can use sarg and get reports showing that websites are
> being cached, so it is working. But it just doesn't seem to be caching
> enough. Are there file types that are not getting cached that I can turn
> on? Why wont this cache fill up?
>
>
>
-- View this message in context: http://www.nabble.com/not-caching-enough-tp25530445p25659633.html Sent from the Squid - Users mailing list archive at Nabble.com.Received on Tue Sep 29 2009 - 09:20:48 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 30 2009 - 12:00:03 MDT