LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2011, 11:14 AM   #1
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Rep: Reputation: Disabled
cache_dir doubt


Hi..everybody,
I have configured squid proxy server. It is working fine and nearly 100 PCs are accessing internet through proxy. I have given the cache size as 250 GB out of 350 GB of /var partition
Code:
cache_dir ufs /var/spool/squid3 250000 16 256
Daily I am checking the size and the /var/spool/squid3 directory size is growing as minimum 600 MB to 1GB daily. I have some doubts here.
Will the squid stops storing cache when the cache size reaches 250GB? or Will it be overwriting with old cache? if it will be overwriting with old cache then how to confirm that old cache is overwriting? Or should I delete cache using "rm -rf /var/spool/squid3/* when it reaches to 250GB? or should I not delete cache? And how to confirm that the recently browsed pages are accessing through cache because if I do
tail -f /var/log/squid3/access.log
the many of the request as showing "direct"
Code:
1324204919.920    114 192.168.0.100 TCP_MISS/200 1251 GET http://www.google.co.in/images/firefox/alert.png - DIRECT/74.125.236.48 image/png
But if I refresh the pages then it shows as Hit
Code:
1324204920.406      6 192.168.0.100 TCP_HIT/301 800 GET http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml - NONE/- text/html
I hope someone will definitely clear my doubt.

Last edited by loveulinux; 12-19-2011 at 11:21 AM.
 
Old 12-20-2011, 10:44 AM   #2
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
Hi..masters, please help me for above doubts.
 
Old 12-20-2011, 04:10 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,053

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
I am not going to claim any mastery, but:

Quote:
...the many of the request as showing "direct"...But if I refresh the pages then it shows as Hit
so, the right thing is happening there, so that particular point gives no cause for concern.

Quote:
Will the squid stops storing cache when the cache size reaches 250GB? or Will it be overwriting with old cache? if it will be overwriting with old cache then how to confirm that old cache is overwriting? Or should I delete cache using "rm -rf /var/spool/squid3/* when it reaches to 250GB? or should I not delete cache?
Squid should manage it; that is, the cache size should continue growing until it runs out of room and then it should stop growing, because at that point it should start deleting old entries in order to make room for the new entries. Now 250 G is a lot and it will probably take you a while to get there (...and I have doubts about whether you will be getting an advantage out of that, because pages may be stale before they fill up the amount of memory, but that isn't the issue here...).

Why don't you, as an experiment set the cache to a different, much smaller, file, so that you can then watch if squid does the right thing. If it behaves correctly with a smaller cache file, it seems quite likely that it will behave correctly with a larger file. Just a thought.
 
1 members found this post helpful.
Old 12-20-2011, 09:06 PM   #4
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
Thank you salasi, I will check it with smaller size first.
 
  


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 cache_dir hard disk space reaching the maximum size sohailkmu Linux - Newbie 1 01-20-2010 10:35 AM
need advice for cache_dir squid moekad Linux - Server 0 11-09-2009 11:14 AM
squid proxy server cache_dir in different partition problem tr3s Linux - Server 8 10-16-2009 01:43 AM
problem with cache_dir in squid sohailkmu Linux - Newbie 25 10-23-2008 12:10 AM
Changing default cache_dir on squid3 not working pliqui Linux - Software 3 12-12-2007 04:37 PM


All times are GMT -5. The time now is 07:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration