r2561 - trunk/varnish-cache/bin/varnishd
Anders Nordby
anders at fupp.net
Fri Apr 18 11:41:29 CEST 2008
Hi,
I also miss something like this, from varnishstat:
n_objoverflow 0 0.00 Objects overflowing workspace
But for sess_workspace.
On Fri, Apr 18, 2008 at 11:40:05AM +0200, Anders Nordby wrote:
> Would it be possible to log free session workspace also?
>
> If I set diag_bitmap to 0x42, I get:
>
> 0 Debug - "WS(0x3a77bbe070 = (sess, 0x3a77bbe790 18 0 8192)"
> 0 Debug - "WS(0x3a0dbe8070 = (sess, 0x3a0dbe8790 20 4096
> 8192)"
> 0 Debug - "WS(0x3a0dbe8070 = (sess, 0x3a0dbe8790 685 0 8192)"
> 0 Debug - "WS(0x3a0dbe8070 = (sess, 0x3a0dbe8790 685 0 8192)"
>
> What are those three fields at the end? The first is space needed, the
> third is space allocated?
>
> Bye,
> Anders.
>
> On Fri, Mar 07, 2008 at 12:43:38PM +0100, phk at projects.linpro.no wrote:
> > Author: phk
> > Date: 2008-03-07 12:43:38 +0100 (Fri, 07 Mar 2008)
> > New Revision: 2561
> >
> > Modified:
> > trunk/varnish-cache/bin/varnishd/cache.h
> > trunk/varnish-cache/bin/varnishd/cache_hash.c
> > trunk/varnish-cache/bin/varnishd/cache_ws.c
> > Log:
> > Log free object workspace instead of used to get the size of the object
> > structure into the picture.
> >
> >
> > Modified: trunk/varnish-cache/bin/varnishd/cache.h
> > ===================================================================
> > --- trunk/varnish-cache/bin/varnishd/cache.h 2008-03-07 11:36:52 UTC (rev 2560)
> > +++ trunk/varnish-cache/bin/varnishd/cache.h 2008-03-07 11:43:38 UTC (rev 2561)
> > @@ -581,7 +581,7 @@
> > char *WS_Alloc(struct ws *ws, unsigned bytes);
> > char *WS_Dup(struct ws *ws, const char *);
> > char *WS_Snapshot(struct ws *ws);
> > -unsigned WS_Used(struct ws *ws);
> > +unsigned WS_Free(struct ws *ws);
> >
> > /* rfc2616.c */
> > int RFC2616_cache_policy(const struct sess *sp, const struct http *hp);
> >
> > Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
> > ===================================================================
> > --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-03-07 11:36:52 UTC (rev 2560)
> > +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-03-07 11:43:38 UTC (rev 2561)
> > @@ -300,7 +300,7 @@
> > VSL_stats->n_objoverflow++;
> > if (params->diag_bitmap & 0x40)
> > WSP(sp, SLT_Debug,
> > - "Object workspace used %u", WS_Used(o->ws_o));
> > + "Object %u workspace free %u", o->xid, WS_Free(o->ws_o));
> >
> > oh = o->objhead;
> > if (oh != NULL) {
> > @@ -366,8 +366,8 @@
> > return;
> >
> > if (params->diag_bitmap & 0x40)
> > - VSL(SLT_Debug, 0,
> > - "Object workspace max used %u", WS_Used(o->ws_o));
> > + VSL(SLT_Debug, 0, "Object %u workspace min free %u",
> > + o->xid, WS_Free(o->ws_o));
> >
> > if (o->vary != NULL)
> > free(o->vary);
> >
> > Modified: trunk/varnish-cache/bin/varnishd/cache_ws.c
> > ===================================================================
> > --- trunk/varnish-cache/bin/varnishd/cache_ws.c 2008-03-07 11:36:52 UTC (rev 2560)
> > +++ trunk/varnish-cache/bin/varnishd/cache_ws.c 2008-03-07 11:43:38 UTC (rev 2561)
> > @@ -136,11 +136,11 @@
> > }
> >
> > unsigned
> > -WS_Used(struct ws *ws)
> > +WS_Free(struct ws *ws)
> > {
> >
> > WS_Assert(ws);
> > - return(ws->f - ws->s);
> > + return(ws->e - ws->f);
> > }
> >
> > char *
> >
> > _______________________________________________
> > varnish-commit mailing list
> > varnish-commit at projects.linpro.no
> > http://projects.linpro.no/mailman/listinfo/varnish-commit
>
>
> --
> Anders.
--
Anders.
More information about the varnish-dev
mailing list