LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-14-2004, 07:55 AM   #1
pin_bk
Member
 
Registered: Jan 2004
Posts: 45

Rep: Reputation: 15
Lan Squid Proxy+Increase Memory


Where can I increase memory for Squid cache. And can I tell squid not to drop the cache every day, or not to deleate some stuff all all after it has been cached?
 
Old 10-14-2004, 11:05 AM   #2
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
well just incease memory in your squid box squid will automatically use it on demand.
squid is not delete object from cache untill and unless is not changed on original server so if object is changed on server then squid will fetch the new copy of an object.

for more squid related FAQ pls point your browser to http://squid-cache.org/

regards
 
Old 10-14-2004, 11:18 AM   #3
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
u can define how much disk space will be used in squid.conf. also u can define how much of RAM will be used! (give the 1/3 of RAM space which is used by squid). but i dont think that u can tell squid not to delete all cached stuff. because squid will always delete the rarely used cached stuff first, if the cache space is full. but it will always keep the most used stuffs in cache.
Code:
cache_dir ufs /var/spool/squid 100 16 256
ufs : the cache system type
/var/spool/squid : where the cache directory is sitting
100 : cache size 100 MB
16 : the number of first directories in /var/spool/cache
256 : the number of subdirectries under each that 16 directories

dont choose very high cache size. it will make your proxy slower.

good luck
 
Old 10-14-2004, 11:42 AM   #4
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
squid will use about 10MB per GB swap_cache to keep a internal list of stored files.

# cat squid.conf | grep cache_dir
cache_dir diskd /cache/squid01 900 16 256
cache_dir diskd /cache/squid02 900 16 256

the cache_mem is for in-transmit objects and should be ~10-25% of total ram (on a busy machine)

# cat squid.conf | grep cache_mem
cache_mem 96 MB

to specify how long things are stored use the refresh_pattern in your config.

# cat squid.conf | grep pattern
refresh_pattern ^ftp: 10080 20% 10080
refresh_pattern ^gopher: 10080 0% 10080
refresh_pattern -i \.gif 15 75% 43200
refresh_pattern -i \.tif 10080 75% 43200 reload-into-ims
refresh_pattern -i \.bmp 10080 75% 43200 reload-into-ims
refresh_pattern -i \.jpg 10080 75% 43200 reload-into-ims
refresh_pattern -i \.png 15 75% 43200 reload-into-ims
refresh_pattern -i \.pdf 10080 100% 43200 reload-into-ims
refresh_pattern -i \.exe 10080 100% 43200 reload-into-ims
refresh_pattern -i \.zip 10080 100% 43200 reload-into-ims
refresh_pattern -i \.gz 10080 100% 43200 reload-into-ims
refresh_pattern -i \.rar 10080 100% 43200 reload-into-ims
refresh_pattern -i \.ace 10080 100% 43200 reload-into-ims
refresh_pattern -i \.js 4320 50% 10080
refresh_pattern -i \.css 4320 50% 10080
refresh_pattern -i \.swf 4320 50% 10080 reload-into-ims
refresh_pattern -i \.htm 120 50% 10080 reload-into-ims
refresh_pattern -i \.html 120 50% 10080 reload-into-ims
refresh_pattern . 0 50% 10080

use memory_pools and eventually limit them to ~96MB

sl mritch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM
Need help to connect a squid proxy to connect to another squid proxy server bellerophon Linux - Newbie 1 02-07-2006 06:52 AM
want to increase memory shukla_chanchal Linux - General 8 11-02-2005 03:33 PM
Secure Proxy Configuration(squid) for a LAN to access Internet pune_abhishek Linux - Networking 5 11-30-2003 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration