squid question
Well, first big post so here goes, lol:
Just a quick bit of background.... our winxp lab of 16 computers is using 2-way satellite via a debian linux proxy server using Squid. The proxy server was preconfigured by the 2-way sat people so i know the default setup is ok. We have been using the setup for over a year now. However, the surfing speed is painful at best, and i am looking for ways to speed things up. I am a complete newbie to linux, so please try to be nice, hehe. What i have been able to piece together from looking at the squid.conf file is that the cache file is on a separate partition using 500mb of space. Would increasing this size be beneficial? (cache_dir ufs /space/cache 500 16 256) Now, currently the problem is that a very small amount of caching seems to be taking place. Isn’t the idea of a server cache to be that once 1 workstation loads a page, it gets cached and subsequent workstations would instead retrieve the webpage files from the cache (instantly)? Does squid clear its cache at certain times by default? One last question.... i recently got help in setting up a brand new ibm eserver which is currently running debian linux. Seeing as how the proxy server is also configured for debian linux, would i be able to move squid over to the new server instead of having a standalone squid proxy server? Thanks. |
i doubt it's a disk cache size issue...
please post your squid.conf (minus the comments and spaces) so we can take a look and see: Code:
cat /etc/squid/squid.conf | grep -v ^# | grep -v ^$ |
Sorry for such a long delay..... i finally got a chance to pull the squid.conf file. Here are the options in the .conf that were not commented out.
Thanks. ____________________________________________________ #WELCOME TO SQUID 2 http_port 3128 cache_peer 204.101.253.193 parent 9877 7 no-query cache_peer 204.101.253.193 parent 9877 7 no-query cache_mem 64 MB cache_dir ufs /space/cache 500 16 256 cache_access_log /space/log/access.log cache_log /space/log/cache.log cache_store_log /space/log/store.log acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl SSL_ports port 443 563 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 563 # https, snews acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT http_access allow all http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny purge http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost http_access deny all icp_access allow all visible_hostname dsquid ___________________________________________________ |
looks like since you aren't specifying a maximum memory object size you are using the default (i think it's 8 KB) which is very small... try specifying a bigger size, this way more objects will get loaded into your (fast) RAM instead of your (slow) hard disk... try 128 KB for example:
Code:
maximum_object_size_in_memory 128 KB Code:
memory_replacement_policy heap LFUDA i hope this helps... good luck... |
another thing you could tweak to improve performance is the logging...
try disabling it (unless you really need it): Code:
cache_log none |
Thanks, yes my maximum_object_size_in_memory was set at default 8KB so i'll make that change. A couple of questions regarding that:
Does that mean that all objects larger than 8kb were not being cached at all, or just not in RAM? Does this also mean that if i added more RAM then even more objects could be loaded directly into RAM instead of the HD? Also, how long do contents stay cached in the proxy server before being dumped? Is there any way i can have contents hang around a lot longer (ie days or weeks)? I'll try both of these changes to see what happens. |
Quote:
Quote:
of course i have no idea how much ram you have or what other programs you are using so i can't really make any specific suggestions - i'm just trying to give you an idea of what to consider... AFAIK, on a stand-alone squid box, the swap should never even get touched at all... Quote:
there's also some very quick documentation in the /etc/squid/squid.conf.default file, for example: Quote:
since you currently have a 500-meg disk cache i'd suggest upping the disk object limit to 8 or maybe 12 megs... for example: Code:
cache_replacement_policy heap LFUDA |
All times are GMT -5. The time now is 12:26 PM. |