Re: [squid-users] Two Questions

From: Mike Kiernan <mkiernan@dont-contact.us>
Date: Thu, 23 Aug 2001 10:14:42 +0200

Your config is:
delay_parameters 1 64000/64000 250/4000

and our pool looks like this:

Pool: 1
        Class: 2

        Aggregate:
                Max: 64000
                Restore: 64000
                Current: 62751

        Individual:
                Max: 4000
                Rate: 250
                Current: 149:4000 166:4000 238:4000

So your max individual bucket size is 4000. This is a class 2 pool so
according to the documentation the bucket number is chosen from
bits 25 through 32 of the ip address of your client connection. So for
the above output - the first bucket is 149; if the network is 192.168.1.0/32
 your first client is 192.168.1.149 and so on [this is outlined more clearly
in the squid.conf.default in your squid/etc directory]
The way the delaypools works is to allow a client connection, create a
bucket for that connection, run the data through, then leave the bucket
existing in case more connections arise. When the number of buckets
reaches 255 it deallocates them all and starts again (personally I find
this a bit of an odd approach, but there may have been 'reasons').
When the bucket is idle (ie. the client is not sending data through the
bucket) it will say 149:4000, my script *guesses* that a bucket is in
use by saying if it's 149:3568 (ie. not 4000) then chances are that
bucket is _in_use_. Why some of them are '-1' I don't know. In my
experience this only occurs when the buckets are massively oversubscribed
(ie. you have 6000 client addresses attempting to use a single class 2 pool of
255 buckets). I haven't investigated the code to see why, because like
everyone else I'm pushed for time!

I'd suggest if you want to trace a particular bucket (for example your 165:-1)
do the maths on the network address, best guess the source ip address, and
then use
tcpdump.

hope it helps,
Mike

> Mike,
> Thanks a lot for your help.
> I tried the new script and it worked perfect but I would like to know the
> meaning of the numbers that I have got
> for example
> 2 233 -1<== in use
> what does it mean?
> then I still need a way to know the IPs,
> any hint??
> just show me the direction to follow:))
> Thanks again for your help.
> I really appreciated it.
> Best Regards,
> Kareem Mahgoub
> ----- Original Message -----
> From: "Mike Kiernan" <mkiernan@onet.pl>
> To: "Kareem Mahgoub" <kareem@thewayout.net>
> Cc: "squid user group" <squid-users@squid-cache.org>
> Sent: Wednesday, August 22, 2001 2:25 PM
> Subject: Re: [squid-users] Two Questions
>
> > sorry for the delay - a couple of holes in my regexes
> > [all mine are class 3 pools, so hadn't tested it on 2's]
> > try it now. run ./public.dp_cachemgr.pl -v
> > It's only really enlightening when you've huge
> > numbers of pools like we have here, and as i said
> > it *won't* give you the ip addresses, but may give
> > you a little more to help locate them if you really
> > must.
> > I run it without -v to build rrdtool graphs
> > - examples attached for 3 machines - one
> > graph for total buckets used (demonstrating nicely
> > the rather bizarre allocation/deallocation technique)
> > and buckets in use (not 100% reliable, but I find in
> > general it does give me a good idea of how busy
> > my pools are).
> >
> > hope it's useful,
> > Mike
> >
> >
> > > Dear Mike,
> > > Thanks a lot for your help.
> > > I tried your script after editing some parameters, yes it is just giving
> me
> > >
> > > Mem: 1576
> > > Pool1 buckets: 1 inuse: 1
> > > Total buckets: 1 inuse: 1
> > >
> > > I am using Squid2 stabel 1 and i am using delay pools type 2.
> > > Do i need other modifications in the script to get the IPs?
> > > Thanks again for your help.
> > > Best Regards,
> > > Kareem Mahgoub
> > > ----- Original Message -----
> > > From: "Mike Kiernan" <mkiernan@onet.pl>
> > > To: "Kareem Mahgoub" <kashraf@thewayout.net>; "squid user group"
> > > <squid-users@squid-cache.org>
> > > Sent: Wednesday, August 22, 2001 11:38 AM
> > > Subject: Re: [squid-users] Two Questions
> > >
> > > > Kareem Mahgoub wrote:
> > > >
> > > > > Hello List,I have two question, which i searched for in the FAQ and
> in
> > > > > the Mailing-list Archive and didn't find an answer for.If the answer
> > > > > exists, kindly provide me with the link and i would really
> appreciate
> > > > > it. Now for the questions:1- How could I make squid accept URLs in
> > > > > UTF-8 formate and prevent refusing it.2- For the Delay-pools, is it
> > > > > possible to find which IP is using certain delay pools entry which
> is
> > > > > found in cache manager?Any help would be very much appreciated.Best
> > > > > Regards,Kareem Mahgoub
> > > >
> > > > I can try number 2):
> > > >
> > > > The answer is...not really.
> > > > If you're using a class 3 pool, it will log the network number and you
> > > > can probably reverse engineer from the buckets activity and a snoop
> > > > which ip is doing what, but there's no explicit logging you can turn
> on.
> > > >
> > > > With a class2 pool the bucket number is probably significant to the
> > > > host number, but I haven't checked it. If your squid is for cacheing
> > > > for an internal network you stand more chance than if it's an
> > > > accelerator on the internet (for which delaypools design kind of
> breaks
> > > > down).
> > > >
> > > > I use the attached script to monitor what the current bucket levels
> > > > are and which one's are in use. It's enough to give me a rough idea
> > > > of what's happening, how busy each pool is etc., but I'm not overly
> > > > happy with the default delaypools cachemgr data as it stands, nor with
> > > > the way it holds onto buckets even when they're no longer required.
> > > > - the script probably won't run unedited on your box (as a minimum
> > > > you'll have to fill in the password). I feed the output into an
> rrdtool
> > > > script.
> > > >
> > > > hope it helps,
> > > >
> > > > Mike Kiernan
> > > >
> > > > --
> > > > Onet.pl S.A.
> > > > http://www.onet.pl/
> > > > Krakow, Poland
> > > >
> > > >
> > > >
> >
> > --
> > Onet.pl S.A.
> > http://www.onet.pl/
> > Krakow, Poland
> >
> >
> >
>
> ----------------------------------------------------------------------------
> ----
>
> ----------------------------------------------------------------------------
> ----

--
Onet.pl S.A.
http://www.onet.pl/
Krakow, Poland
Received on Thu Aug 23 2001 - 02:14:12 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:53 MST