vmod_vsthrottle memory usage
Cosimo Streppone
cosimo at streppone.it
Wed Apr 11 10:47:48 UTC 2018
Hi,
I'm looking at the vsthrottle vmod. Have a proof of concept VCL up and running,
and it seems to work very nicely (with varnish 4.1.9). Thanks for this work!
I'm wondering what vsthrottle's behaviour is when there's no memory available,
specifically when tb_alloc() fails.
>From what I can understand from the code[1]:
b = tb_alloc(digest, limit, period, now);
AZ(VRB_INSERT(tbtree, &v->buckets, b));
and tb_alloc() also checks for a non-zero malloc result (AN()).
I understand we're talking about a remote possibility, and I see vsthrottle
reclaims unused memory. However, when no memory is available for the malloc,
will varnish leave a trace in syslog, exit and restart by way of the asserts?
--
Cosimo
[1] https://github.com/varnish/varnish-modules/blob/master/src/vmod_vsthrottle.c#L126-L127
More information about the varnish-misc
mailing list