Limits in xkey module usage ?
Carlos Abalde
carlos.abalde at gmail.com
Tue Sep 25 10:29:33 UTC 2018
> On 25 Sep 2018, at 11:27, Olivier Hanesse <olivier.hanesse at gmail.com> wrote:
>
> Hello Carlos,
>
> Thanks for your answer. About thread contention during invalidation, can you be more specific ?
> At what scale can we encounter such contentions ?
> Hundreds of objects linked to a key ? or Thousand ? ten thousand ?
Hi Olivier,
Basically I'm talking about thread contention generated by this loop [1]: when a key is purged, if that key is linked to a huge amount of objects, the lock is going to be held during a noticeable amount of time. That will block other threads executing callbacks [2] in order to to add / remove object to / from the xkey state.
What would be too many objects linked to a single key? To be honest, I don't know. For an answer we'll need to invoke the VMOD authors :)
[1] https://github.com/varnish/varnish-modules/blob/0.15.0/src/vmod_xkey.c#L531-L579 <https://github.com/varnish/varnish-modules/blob/0.15.0/src/vmod_xkey.c#L531-L579>
[2] https://github.com/varnish/varnish-modules/blob/0.15.0/src/vmod_xkey.c#L423-L465 <https://github.com/varnish/varnish-modules/blob/0.15.0/src/vmod_xkey.c#L423-L465>
Best,
--
Carlos Abalde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180925/089ce31d/attachment.html>
More information about the varnish-misc
mailing list