Strange behaviour

2009-11-18 Thread Andreas Haase
Hello,

we are using varnish v2.0.4 in a setup with 4 backend servers. The
varnish is configured to use the backends with loadbalancing in a
round-robin fashion and all worked well until some days ago. Until we
removed 2 of the backends we had a cache ratio (total requests compared
to totalfetches) of 80 percent. After removing 2 of the backends the
ratio is only 57 percent now. The only change to varnish configuration
has been to remove the backends that are not operational any more. The
data to be cached has not been changed.

And now I'm wondering what is the reason for that behaviour? I could
imagine this when there had been a changed of content to cache or
something else. Anyone here who could give me a possible explanation for
that?

Thanks in advance.
-- 
Mit freundlichen Gruessen

Andreas Haase

Administration und Technik
evolver services GmbH

Fon +49 / (0)3 71 / 4 00 03 727
Fax +49 / (0)3 71 / 4 00 03 79

E-Mail  andreas.ha...@evolver.de
Web http://www.evolver.de


Sitz der Gesellschaft:  Chemnitz
Handelsregister:Amtsgericht Chemnitz, HRB 22649
Geschaeftsfuehrer:  Dirk Neubauer

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Worker thread stack size

2009-11-18 Thread Poul-Henning Kamp

I have added a parameter to set the worker thread stack size.

I suspect we can get away with something as low as maybe 64k +
$sess_workspace, but I have absolutely no data to confirm or
deny this claim.

If a couple of you could spend a few minutes to examine actual
stack sizes and report back, that would be nice.

The number I am interested in, is the number of mapped and
modified pages in the worker-thread stacks.

On FreeBSD, the mincore(2) could report this, but on Linix mincore(2)
only reports mapped vs. unmapped pages, which may or may not be
enough.  In either case, it would require some hackish code in Varnish.

A better way is to ask your systems VM system, for instance by
looking at /proc/$pid/map.

On a 64bit FreeBSD system, the entries you are looking for look like
this:
0x7ddd 0x7ddf 3 0 0xff003d87e0d8 rw- 1 0 0x3100 
NCOW NNC default - CH 488
0x7dfd1000 0x7dff1000 3 0 0xff0028845d80 rw- 1 0 0x3100 
NCOW NNC default - CH 488
0x7e1d2000 0x7e1f2000 3 0 0xff00635eea20 rw- 1 0 0x3100 
NCOW NNC default - CH 488
0x7e3d3000 0x7e3f3000 3 0 0xff0095d57870 rw- 1 0 0x3100 
NCOW NNC default - CH 488
0x7e5d4000 0x7e5f4000 3 0 0xff00630ec0d8 rw- 1 0 0x3100 
NCOW NNC default - CH 488

And the number I need is the difference between the first two colums
for all your worker threads, (min, max, average accepted also )
and the value of your sess_workspace parameter.

In the case you would find:
0x7ddf - 0x7ddd = 128K
0x7dff1000 - 0x7dfd1000 = 128K
...

Poul-Henning


In message 20091118123439.6a18c38...@projects.linpro.no, p...@projects.linpro.
no writes:
Author: phk
Date: 2009-11-18 13:34:39 +0100 (Wed, 18 Nov 2009)
New Revision: 4352

Modified:
   trunk/varnish-cache/bin/varnishd/cache_pool.c
   trunk/varnish-cache/bin/varnishd/heritage.h
   trunk/varnish-cache/bin/varnishd/mgt_pool.c
Log:
Add a parameter to set the workerthread stacksize.

On 32 bit systems, it may be necessary to tweak this down to get high
numbers of worker threads squeezed into the address-space.

I have no idea how much stack-space a worker thread normally uses, so
no guidance is given, and we default to the system default.

Fixes #572

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Expires and Cache-Control stripped by varnish?

2009-11-18 Thread Lars Jørgensen
Hi,

Another one that I'm trying to work out at the moment. I have enabled 
mod_expires in Apache and set a 24 hour expiration on css. When I request a 
page directly from the backend, a CSS object looks like this:

Date: Wed, 18 Nov 2009 12:57:50 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13
Connection: Keep-Alive
Keep-Alive: timeout=15
Etag: da8e2c-e663-6c305b40
Expires: Thu, 19 Nov 2009 12:57:50 GMT
Cache-Control: max-age=86400

The same object through Varnish:

Date: Wed, 18 Nov 2009 12:56:24 GMT
Via: 1.1 varnish
X-Varnish: 71655288
Last-Modified: Mon, 22 Jun 2009 10:34:45 GMT
Connection: keep-alive

I do get 304 Not Modified on the object, but shouldn't I get the Expires and 
Cache-Control headers too?


-- 
Lars




___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Fwd: Cache utilization?

2009-11-18 Thread Poul-Henning Kamp
In message 2af2dcee-6443-41c2-8be4-c338203f2...@gyldendal.dk, =?iso-8859-1?Q?
Lars_J=F8rgensen?= writes:

 I have:
 =
 n_lru_nuked 0  .   N LRU nuked objects
 n_lru_saved 0  .   N LRU saved objects
 n_lru_moved   3692590  .   N LRU moved objects
 =
 I guess what you call kill activity is the same as nuked objects?

Correct, you seem to have plenty cache space.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


too much requests for varnish?

2009-11-18 Thread Daniel Bruessler
Hi,

we're using varnish for a newspaper-portal and see in the logfile that
about 1% of the requests are NOT done by varnish. That requests don't
get the special varnish-http-header like the Age: info.

Is there a limit? Did anybody of you have that problem already? (we're
using varnish 2.0.4 with 1GB of RAM-limit, about 3 single requests a second)

Cheers!
Daniel

:: Daniel Bruessler - Emilienstr. 10 - 90489 Nuernberg

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
2009/11/17 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com:
 Hi

 I'm a total newb to varnish but here is my problem:

 When I connect to my plone site directly there is no problem however the
 moment i use varnish none of the css loads and all that loads is the html...
 pressing on plone's links to validate css returns that none of the css files
 are found when going through varnish.

What urls do the css files linked from the page have?

Laurence
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
What are the response headers you see in Firebug? varnishlog output is
also helpful.

Laurence

2009/11/18 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com:
 Hi lawrence

 here are the import statements from the generated plone source:

 style type=text/css@import
 url(http://parctechno.mediacommune.org/portal_css/Plone%20Default/base-cachekey5861.css);/style

 style type=text/css media=all@import
 url(http://parctechno.mediacommune.org/portal_css/Plone%20Default/ploneCustom-cachekey5221.css);/style



 I'm really new to both plone and varnish so if it's something really obvious
 I apologize ahead of time :P


 On Wed, Nov 18, 2009 at 12:04 PM, Laurence Rowe l...@lrowe.co.uk wrote:

 2009/11/17 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com:
  Hi
 
  I'm a total newb to varnish but here is my problem:
 
  When I connect to my plone site directly there is no problem however the
  moment i use varnish none of the css loads and all that loads is the
  html...
  pressing on plone's links to validate css returns that none of the css
  files
  are found when going through varnish.

 What urls do the css files linked from the page have?

 Laurence
 ___
 varnish-misc mailing list
 varnish-misc@projects.linpro.no
 http://projects.linpro.no/mailman/listinfo/varnish-misc



 --
 Eric Labelle
 (Dubian)
 
 Dubearth Collective - www.dubearth.com



___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
OK, from this I can see that you requested the url:
http://parctechno.mediacommune.org:6081/ but have set the Zope virtual
hosting to be http://parctechno.mediacommune.org/ (the port is
missing). This means that the css is being requested on a different
server (your apache instance).

Change the vcl to say:

set req.url = 
/VirtualHostBase/http/parctechno.mediacommune.org:6081/2/VirtualHostRoot/
req.url;

run Varnish on port 80 or set Apache to proxy through to Varnish.

Laurence

2009/11/18 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com

 GET base-cachekey5861.css:

 Response Headers
 Date Wed, 18 Nov 2009 17:20:41 GMT
 Server Apache/2.2.3 (CentOS)
 Content-Length 336
 Connectionclose
 Content-Typetext/html; charset=iso-8859-1
 Request Headers
 Hostparctechno.mediacommune.org
 User-AgentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) 
 Gecko/20091102 Firefox/3.5.5 GTB6
 Accepttext/css,*/*;q=0.1
 Accept-Languageen-us,en;q=0.5
 Accept-Encodinggzip,deflate
 Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
 Keep-Alive300
 Connectionkeep-alive
 Refererhttp://parctechno.mediacommune.org:6081/
 Cache-Controlmax-age=0
 GET Plonecustom-cachekey5221.css :


 DateWed, 18 Nov 2009 17:20:41 GMT
 ServerApache/2.2.3 (CentOS)
 Content-Length343
 Connectionclose
 Content-Typetext/html; charset=iso-8859-1
 Request Headers
 Hostparctechno.mediacommune.org
 User-AgentMozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) 
 Gecko/20091102 Firefox/3.5.5 GTB6
 Accepttext/css,*/*;q=0.1
 Accept-Languageen-us,en;q=0.5
 Accept-Encodinggzip,deflate
 Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
 Keep-Alive300
 Connectionkeep-alive
 Refererhttp://parctechno.mediacommune.org:6081/
 Cache-Controlmax-age=0

 I've attached what i figured would be the most relevant info for you from the 
 varnish log as a txt file.

 Thanks!



 On Wed, Nov 18, 2009 at 12:15 PM, Laurence Rowe l...@lrowe.co.uk wrote:

 What are the response headers you see in Firebug? varnishlog output is
 also helpful.

 Laurence

 2009/11/18 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com:
  Hi lawrence
 
  here are the import statements from the generated plone source:
 
  style type=text/css@import
  url(http://parctechno.mediacommune.org/portal_css/Plone%20Default/base-cachekey5861.css);/style
 
  style type=text/css media=all@import
  url(http://parctechno.mediacommune.org/portal_css/Plone%20Default/ploneCustom-cachekey5221.css);/style
 
 
 
  I'm really new to both plone and varnish so if it's something really 
  obvious
  I apologize ahead of time :P
 
 
  On Wed, Nov 18, 2009 at 12:04 PM, Laurence Rowe l...@lrowe.co.uk wrote:
 
  2009/11/17 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com:
   Hi
  
   I'm a total newb to varnish but here is my problem:
  
   When I connect to my plone site directly there is no problem however the
   moment i use varnish none of the css loads and all that loads is the
   html...
   pressing on plone's links to validate css returns that none of the css
   files
   are found when going through varnish.
 
  What urls do the css files linked from the page have?
 
  Laurence
  ___
  varnish-misc mailing list
  varnish-misc@projects.linpro.no
  http://projects.linpro.no/mailman/listinfo/varnish-misc
 
 
 
  --
  Eric Labelle
  (Dubian)
  
  Dubearth Collective - www.dubearth.com
 
 
 
 ___
 varnish-misc mailing list
 varnish-misc@projects.linpro.no
 http://projects.linpro.no/mailman/listinfo/varnish-misc



 --
 Eric Labelle
 (Dubian)
 
 Dubearth Collective - www.dubearth.com


___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc