Hit ratio dropped significantly after recent upgrades

Jason Price japrice at gmail.com
Thu Dec 8 14:35:04 CET 2016


I think we're going to need something a little more specific to go on.
That is a mile of changes all at once.

Finding a single request that should be cached, but isn't and producing the
varnish log for that request will probably help illuminate what's going on.

On Wed, Dec 7, 2016 at 4:22 PM, Justin Lloyd <justinl at arena.net> wrote:

> Hello,
>
>
>
> I use Varnish on four load-balanced web servers running Apache with
> several virtual hosts providing MediaWiki wikis. Last week I upgraded the
> web servers to support upgrading MediaWiki from 1.26 to 1.27 due to PHP
> requirements. This meant upgrading (reinstalling) Ubuntu 12.04 to 16.04,
> meaning I went from PHP 5.3 to 7, Apache 2.4 + mod_php to Apache 2.4 +
> PHP-FPM, and Varnish 3 to 4.
>
>
>
> For the upgrade from Varnish 3 to 4, I adapted my VCL code
> <https://gist.github.com/Calygos/105957a997ea3bde6b8257a1f34bbd20>
> accordingly, based on Mediawiki Varnish sample code
> <https://www.mediawiki.org/wiki/Manual:Varnish_caching>, but for reasons
> I don’t understand, my Varnish hit ratio dropped from around 86% to
> ~20-37%. This picture <http://imgur.com/jX4iu6s> shows a graph of the
> last 10 days hit ratio calculations for the four web servers. The graph is
> calculated using metrics from the Collectd Varnish plugin as (conns -
> bereqs / conns), i.e.:
>
>
>
> asPercent(
>
>     diffSeries(
>
>         linux.*hostname*.varnish-default-connections.connections-received,
>
>         linux.*hostname*.varnish-default-backend.http_requests-requests
>
>     ),
>
>    linux.*hostname*.varnish-default-connections.connections-received
>
> )
>
>
>
> I’ve also tried the Varnish hit and miss metrics but those give similar
> results. So I’m not sure what changed to give such a poor hit ratio,
> despite otherwise good performance on large, busy wikis. It’s possible it
> could be something in MediaWiki’s cookie and/or session handling and I’ve
> been investigating that possibility as well, but I figured this would be a
> good place to ask, too.
>
>
>
> Thanks,
>
> Justin
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20161208/f065fe67/attachment.html>


More information about the varnish-misc mailing list