Debug: On Waiting list?

2007-11-16 Thread Erik
Hi,
Im struggling with a couple of high response times when using
 varnish on our site. I have configured varnish so it will
 cache only static content (jpg,gif,png,css,js etc) even if a
 cookie is set. But all our jpeg's are getting a high response
 time when Im running some test against the site. 
One of the jpeg's are pic_mini.jpg, it has a response time of 357ms. I turned 
on logging and vcl_trace and found the line:

   14 Debugc Hash Match:
 /Portals/0/Picture/pic_mini.jpg#www3.mydomain.com#
   14 Debugc on waiting list on obj 1767384108

Does on waiting list has something to do with the high response time?

The rest fo the log for pic_mini.jpg is:

   14 ReqStart c xx.xx.xx.187 41506 1767384112
   14 RxRequestc GET
   14 RxURLc /Portals/0/Picture/pic_mini.jpg
   14 RxProtocol   c HTTP/1.1
   14 RxHeader c Host: www3.mydomain.com
   14 RxHeader c User-Agent: Mozilla/5.0 (Windows; U; Windows
 NT 5.1; sv-SE; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
   14 RxHeader c Accept: */*
   14 RxHeader c Accept-Language: sv,en-us;q=3D0.7,en;q=3D0.3
   14 RxHeader c Accept-Encoding: gzip,deflate
   14 RxHeader c Accept-Charset:=
 ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.7
   14 RxHeader c Keep-Alive: 300
   14 RxHeader c Connection: Keep-Alive
   14 RxHeader c Cookie: language=3Den-US;
 .ASPXANONYMOUS=3DnBeDLiReyAEkYTIwNmNiYjYtNmRmMS00MmQ4LThlZGItY=
mZlNThjYjhjZjky0
   14 VCL_call c recv
   14 VCL_tracec 1 84.14
   14 VCL_tracec 2 87.13
   14 VCL_tracec 3 87.51
   14 VCL_return   c lookup
   14 VCL_call c hash
   14 VCL_tracec 47 22.14
   14 VCL_tracec 48 24.9
   14 VCL_tracec 49 24.24
   14 VCL_return   c hash
   14 Debugc Hash Match:
 /Portals/0/Picture/pic_mini.jpg#www3.mydomain.com#
   14 Debugc on waiting list on obj 1767384108

In vcl_recv im fetching static content using:

sub vcl_recv {

# *.jpg , *.jpeg , *.gif , *.png , *.ico
if (req.url ~ .(jpg|gif|png|jpeg|ico)$) {
lookup;
}

# *.js , *.css , *.swf
if (req.url ~ .(js|css|swf)$) {
lookup;
}

if (req.http.Cookie) {

# *.jpg , *.jpeg , *.gif , *.png , *.ico
if (req.url ~ .(jpg|gif|png|jpeg|ico)$) {
lookup;
}

# *.js , *.css , *.swf
if (req.url ~ .(js|css|swf)$) {
lookup;
}
}

pass;
} #RECV


and my vcl_fetch is using:
sub vcl_fetch {

# *.jpg , *.jpeg , *.gif , *.png , *.ico
if (req.url ~ .(jpg|gif|png|jpeg|ico)$) {
insert;
}

# *.js , *.css , *.swf
if (req.url ~ .(js|css|swf)$) {
insert;
}

if (obj.http.Set-Cookie) {
# *.jpg , *.jpeg , *.gif , *.png , *.ico
if (req.url ~ .(jpg|gif|png|jpeg|ico)$) {
insert;
}

# *.js , *.css , *.swf
if (req.url ~ .(js|css|swf)$) {
insert;
}

pass;
}

#
pass;

} #FETCH


// Erik

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


Re: Debug: On Waiting list?

2007-11-16 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Erik writes:
Hi,
Im struggling with a couple of high response times when using
 varnish on our site. I have configured varnish so it will
 cache only static content (jpg,gif,png,css,js etc) even if a
 cookie is set. But all our jpeg's are getting a high response
 time when Im running some test against the site. 
One of the jpeg's are pic_mini.jpg, it has a response time of 357ms. I turned 
on logging and vcl_trace and found the line:

   14 Debugc Hash Match:
 /Portals/0/Picture/pic_mini.jpg#www3.mydomain.com#
   14 Debugc on waiting list on obj 1767384108

On waiting list means that somebody else asked for that object from
the backend, and that this session now awaits that they get a
response before it continues.

If the other session gets a cacheable response, this session will
return that cached reply, but if the result is not cacheable,
this session will then have to go to the backend.

The idea here, is that when an object is not in the cache, we
should not send hordes of clients to the backend after it, if
the first one can do the job alone.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | 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