LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-07-2011, 11:56 PM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Rep: Reputation: 31
How to increase cache speed in squid ?


Hi,
I need guidance related to squid cache.I am using Red Hat Linux as a squid proxy server. My server have 200 GB Hard Disk with 3 GB ram.
The clients mostly visit google,msn ,yahoo mail ,gmail,hotmail.
To increase the cache speed I does't know which tag should I use so my clients may access the web pages very fast. If I am correct please guide me.

In /etc/squid/squid.conf file cache_mem 16 MB as default size.Can we change it upto 500MB

Another related thing is cache_dir ufs /cache 200 16 256.The default size of cache dir is 200 so can I increase it upto 500 ?

thanks in advance.
garden
 
Old 01-08-2011, 10:54 AM   #2
xandercage17
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: Disabled
Delete My account

Last edited by xandercage17; 04-22-2012 at 03:39 PM. Reason: Delete My account
 
Old 01-08-2011, 04:16 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
I'm sorry, but I am going to be a bit obtuse and unhelpful, at first. This is in the interests of helping you more fully.

Quote:
Originally Posted by gardenair View Post
To increase the cache speed I does't know which tag should I use so my clients may access the web pages very fast. If I am correct please guide me.
...You seem to have the idea that there is 'a squid tag' (which I am reading as a squid configuration directive or value) which will cure all of your problems. This may not be the case...

Quote:
Originally Posted by gardenair View Post
The clients mostly visit google,msn ,yahoo mail ,gmail,hotmail.
Caching speeds up access to things that are cached and doesn't help with things that are not cached. Three out of the five examples that you have given are mail programs. When a user points a browser at a mail program, what are the chances that there is a copy of the requested page in cache? (this is a loaded question in the sense that no other user should have previously viewed that page, ever. If the page has never been viewed before, it can't be in cache. even in the case that this user is viewing an exact page that has been viewed before, some mail programs use the nocache directive, or similar, to prevent caching, because caching = ! updating, which is bad (sort of) and this is true for many sites which dynamically generate pages)

And, for something like a google search, caching can help with pages that have been viewed before (think the opening page and going back to a previously viewed page), but can't really help when you initially do a search or initially view a page (except when someone else has looked at that self-same page).

Remember also that browsers already have caching built-in, so in attempting to improve things, you have to better the browser's internal cache.

Quote:
Originally Posted by gardenair View Post
In /etc/squid/squid.conf file cache_mem 16 MB as default size.Can we change it upto 500MB

Another related thing is cache_dir ufs /cache 200 16 256.The default size of cache dir is 200 so can I increase it upto 500 ?
Yes, why not? But a better question is 'will it do any good?'

You can certainly try things and measure things. If you have decided to measure the right things, this will help you to decide whether changes you have made is an improvement.

As xandercage17 suggests, ensuring that you have a fast subsystem for storing squid's files is a good thing. But if you have a poor cache hit rate, having a very fast storage subsystem can't help.
 
1 members found this post helpful.
Old 01-10-2011, 11:27 PM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks for your replies. Well I agree with your comments that if any user will get a web page squid will save it in its cache directory and next time when ever some one will need same page squid will give it instead to go real web server.
The SQUID cache_mem 16 MB which is default is a physical cache area ? or it do all processing in RAM ?
About cache_dir ufs /cache 200 16 256 which is a cache directory I think directory size is fixed as 200 MB and what about if the cache is full ? Can I see this directory as well ?
Actually there is a confusion in my mind about cache memory and cache Directory.In general l when we say cache it operating systems it means data which processor keep in its cache area (if i am correct) and pages in ram to minimize work the physical I/O devices to give maximum out but in squid case i am sure it will be different.
Kindly enlighten on my point .
thanks in advance.
garden
 
Old 01-11-2011, 04:46 AM   #5
xandercage17
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: Disabled
Delete My account

Last edited by xandercage17; 04-22-2012 at 03:39 PM. Reason: Delete My account
 
  


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
Upload speed limiting to increase download speed dangerousdave Linux - Networking 6 02-16-2010 04:19 PM
[squid] How do I increase number of url_rewriter processes in squid? rozilla Linux - Server 2 11-17-2009 08:54 AM
Using Active directory Authentication of parent non-squid cache to child squid cache espiya7 Linux - Server 0 05-05-2009 09:04 AM
How to increase disk cache and maximize RAM usage? Maria Red Hat 0 10-21-2007 03:07 AM
Linux cache/buffers never increase DukeLeto Linux - General 1 01-02-2007 12:02 AM


All times are GMT -5. The time now is 05:56 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