Hit ratio dropped significantly after recent upgrades
Justin Lloyd
justinl at arena.net
Tue Dec 13 17:36:51 CET 2016
Yep! Getting tons of uncacheable responses, including lots of /images/thumb URLs, due to negative TTLs. Not sure yet what the best way to handle this is since I'm sure this is done for a reason, so I'll need to dig back in to the MW code and possibly hit up the devs on IRC again. Thanks! I'll let you know how this goes.
Justin
-----Original Message-----
From: Dridi Boukelmoune [mailto:dridi at varni.sh]
Sent: Tuesday, December 13, 2016 7:42 AM
To: Justin Lloyd <justinl at arena.net>
Cc: Guillaume Quintard <guillaume at varnish-software.com>; varnish-misc at varnish-cache.org
Subject: Re: Hit ratio dropped significantly after recent upgrades
On Tue, Dec 13, 2016 at 4:20 PM, Justin Lloyd <justinl at arena.net> wrote:
> That's really the crux of my problem, as I tried to summarize in my last big email though it was longer than it probably should have been. Is it possible to determine from varnishlog whether/which requests are being missed and fetched but not cached?
There are more things you can see with varnishlog like hashes for instance, but you could start by logging markers in your VCL to see which branches you are taking.
Example:
if (beresp.ttl <= 0s) {
std.log("negative ttl");
set beresp.uncacheable = true;
return (deliver);
}
And do the same for all branches, and see which code is executed.
> I get the feeling that this will turn out to be either something very simple in the Varnish and/or MediaWiki configuration or else a bug somewhere, though I'd lean towards the former as being more likely.
If you can reproduce it in lab conditions where you are the only user, look for a transaction containing:
- VCL_return hash
- VCL_call HASH
- VCL_return lookup
- VCL_call PASS
And then look for the previous transaction on the same resource.
Dridi
More information about the varnish-misc
mailing list