[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Transparent proxy
Squid is a very complicated and hungry process. Typically, it uses up so
much memory, but this also depends on your configuration in the "squid.conf"
file, and the level of performance tuning on your operating system and
hardware.
I'd recommend reading the Squid FAQ at www.squid-cache.org, but just to give
a few tips, Squid is an I/O bound process. So, you need to have lots of RAM
and a very fast disk. Usually, you should caculate your RAM at 10MB of RAM
per 1GB of cache data, and add your cache_mem setting of another 10 - 20MB
of RAM. But these are conservative, recommended figures, and over-estimating
here is heavily advised.
Tuning your "squid.conf" file to reduce things such as
"maximum_object_size", is crucial because Squid uses alot of memory to store
in-transit objects. So, this parameter basically determines how much memory
an in-transit object can use before it's marked uncachable. When the object
has been delivered to the client it is deleted from memory and that memory
is freed. So, the lower your "maximum_object_size" definition, the lower
your memory usage.
The FAQ and other Internet sources have more tips on how to properly
optimise your "squid.conf" file, and in effect, optimise your Squid service
and performance.
Squid also uses memory for other functions, such as:
o "hot objects", kept entirely in memory
o NetDB ICMP measurement database
o IP cache contents
o FQDN cache contents
o disk buffers for reading and writing
o network I/O buffers
o per-request state information, including full request and reply headers
o miscellaneous statistics gathering
Certain UNIX/Linux operating systems require kernel and other
kernel-dependent tuning schemes to run optimumly with Squid. What you should
be looking for, as you make your optimisations, is a situation where you
never run out of RAM and thus, never swap. Swapping makes Squid your enemy.
I've seen this done on Linux systems, where the operating system always
reserves 2MB of RAM that can't be touched. When that threshold is reached,
the RAM counts resets back to 3MB and so on and so forth.
The desired result, hot objects are written into and deleted from RAM, and
you never swap.
Regards,
Mark Tinka
Network Engineer
Africa Online Uganda
5th Floor, Commercial Plaza
7 Kampala Rd,
Tel: +256-41-258143
Fax: +256-41-258144
E-mail: mtinka at africaonline.co.ug
Web: www.africaonline.co.ug
-----Original Message-----
From: owner-afnog at afnog.org [mailto:owner-afnog at afnog.org]On Behalf Of
Antonio Godinho
Sent: Friday, November 29, 2002 3:27 PM
To: afnog at afnog.org
Subject: Transparent proxy
Hi,
I have setup a transparent proxy using squid 24 and FreeBSD 4.7.
It works normally but after a few minutes I start getting the
message:
Nov 29 09:40:55 servername /kernel: All mbuf clusters exhausted,
please see tuning(7).
repeatedly on the monitor. Does anyone know What is causing
this?
Cheers,
Antonio Godinho
B.Sc., MCP, MCP+Internet, MCSE, CCNA
Address:Av. Julius Nyerere 947 3rd floor esq
Maputo - Mozambique
Phone : 258-82-300392
e-mail : ANTONIO at nambu.uem.mz
An expert is one who knows more and more
about less and less until he knows absolutely
everything about nothing.
-----
This is the afnog mailing list, managed by Majordomo 1.94.5
To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)
This list is maintained by owner-afnog at afnog.org
-----
This is the afnog mailing list, managed by Majordomo 1.94.5
To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)
This list is maintained by owner-afnog at afnog.org