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 not 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
How to increase cache speed in squid ?
set cache_mem to no more than 1/3rd of your RAM. you can set it to 1GB.
the 200 in your cache_dir line means just 200 mbytes. set it to something like 150000 (around 150 gbytes).
the more you can cache in memory, the faster it'll work. you should also change the "ufs" in the cache_dir line to aufs.
also, use a recent server distribution, like ubuntu 10.04 LTS server.
the 200 in your cache_dir line means just 200 mbytes. set it to something like 150000 (around 150 gbytes).
the more you can cache in memory, the faster it'll work. you should also change the "ufs" in the cache_dir line to aufs.
also, use a recent server distribution, like ubuntu 10.04 LTS server.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
1. upgrading ubuntu whenever a new release comes out is way easier than upgrading rhel. for example, see the network upgrade for ubuntu servers section under the 8.04 LTS to 10.04 LTS heading.
2. rhel ships once every few years. with ubuntu, you have the choice of using LTS (long term release) -- one release every 2-3 years, or upgrading every six months. that's for both desktop and server distributions.
3. rhel ships with some really old apps. for example, rhel 5 (released in march 2007) ships with python 2.4 (released in november 2004). rhel 6 is better in that respect, but even then, it has 2.6 whereas the stable release right now is 2.7 (3.x is still experimental). by the time rhel 7 comes out, rhel 6's packages will seem terribly old. a lot of people had to compile their own versions of php because rhel 5's version is ancient.
4. ubuntu has access to more packages -- over 20,000 in 9.04, for example.
and lastly,
5. if you use rhel, it's likely that you didn't pay for the subscription, and won't get updates. use ubuntu server, where security/other updates are free for five years. without updates, it's likely that someone will be able to break into your server, especially if you run a php website, etc.
2. rhel ships once every few years. with ubuntu, you have the choice of using LTS (long term release) -- one release every 2-3 years, or upgrading every six months. that's for both desktop and server distributions.
3. rhel ships with some really old apps. for example, rhel 5 (released in march 2007) ships with python 2.4 (released in november 2004). rhel 6 is better in that respect, but even then, it has 2.6 whereas the stable release right now is 2.7 (3.x is still experimental). by the time rhel 7 comes out, rhel 6's packages will seem terribly old. a lot of people had to compile their own versions of php because rhel 5's version is ancient.
4. ubuntu has access to more packages -- over 20,000 in 9.04, for example.
and lastly,
5. if you use rhel, it's likely that you didn't pay for the subscription, and won't get updates. use ubuntu server, where security/other updates are free for five years. without updates, it's likely that someone will be able to break into your server, especially if you run a php website, etc.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
-
- Cadet
- Posts: 7
- Joined: Mon Oct 15, 2012 12:22 pm
- Contact:
Re: How to increase cache speed in squid ?
Hats off! Very informative post and I also need this information.
-
- Company Havaldaar Major
- Posts: 178
- Joined: Sat Nov 20, 2004 5:56 pm
- Location: Attock-#-Junction
Re: How to increase cache speed in squid ?
Okay! it's not directly related to changing Squid Cache Size & Speed... but may be help in overall performance of Squid
Anyway here's my own eXperience with Squid Speed Issues, just sharing for fun... Yes feel free to disagree
1. FreeBSD (64bit is better, 32bit is good) is best of all, I have tried CENTOS, Fedora (RHEL xBased), Debian and Ubuntu and very little of once SUN Solaris (when Oracle takeover the SUN, I don't know where is Solaris...Community died ...ah!)
2. Yes try on some decent (64bit) machine, plenty of RAM and Adventure it with ZFS...! oh ya just have a fun...Wait for a moment.
3. Recent, Updated Version of Squid is also important, yes new features count on performance...try Squid 3x or Compile latest from squid-cache website.
3. Try to configure on same or other near by machine "pDNSd" {cd /usr/ports/dns/pdnsd && Make install clean}. I observe considerable difference in speed of web browsing when you use your local Cache-DNS Server... "pdnsd is a proxy dns server with permanent caching (the cache contents are written to hard disk on exit) that is designed to cope with unreachable or
down dns servers (for example in dial-in networking). pdnsd can be used with applications that do dns lookups.... more details pDNSd
little bit more details of pDNSd
Also try to dns server: 4.2.2.2 (add this in "pdnsd.conf" and use 127.0.0.1 as your DNS) OR try to run test for fast, near DNS server.
4. So increasing size of squid cache is very important, but also consider other factors, like OS (the big horse) file system, local cache DNS Server, and in squid.conf give "dns_nameservers 127.0.0.1" in case you are using DNS Cache Server on same machine.
Have a Fun
Anyway here's my own eXperience with Squid Speed Issues, just sharing for fun... Yes feel free to disagree
1. FreeBSD (64bit is better, 32bit is good) is best of all, I have tried CENTOS, Fedora (RHEL xBased), Debian and Ubuntu and very little of once SUN Solaris (when Oracle takeover the SUN, I don't know where is Solaris...Community died ...ah!)
2. Yes try on some decent (64bit) machine, plenty of RAM and Adventure it with ZFS...! oh ya just have a fun...Wait for a moment.
3. Recent, Updated Version of Squid is also important, yes new features count on performance...try Squid 3x or Compile latest from squid-cache website.
3. Try to configure on same or other near by machine "pDNSd" {cd /usr/ports/dns/pdnsd && Make install clean}. I observe considerable difference in speed of web browsing when you use your local Cache-DNS Server... "pdnsd is a proxy dns server with permanent caching (the cache contents are written to hard disk on exit) that is designed to cope with unreachable or
down dns servers (for example in dial-in networking). pdnsd can be used with applications that do dns lookups.... more details pDNSd
little bit more details of pDNSd
Also try to dns server: 4.2.2.2 (add this in "pdnsd.conf" and use 127.0.0.1 as your DNS) OR try to run test for fast, near DNS server.
4. So increasing size of squid cache is very important, but also consider other factors, like OS (the big horse) file system, local cache DNS Server, and in squid.conf give "dns_nameservers 127.0.0.1" in case you are using DNS Cache Server on same machine.
Have a Fun
Sh@Ring is Le@Rning