-
Notifications
You must be signed in to change notification settings - Fork 380
VIP 26: limit private prefetch
Nils Goroll edited this page Apr 23, 2019
·
6 revisions
- Add means to limit the amount of data prefetched for private objects
- Limit the Transient storage in size by default
While HTTP/1 pipe mode uses a fixed buffer to relay the backend response, for private objects via pass/hfm/hfp, all backend response data is prefetched as quickly as possible from the backend.
This requires potentially unbound amounts of storage and may trigger unexpected errors when transient stevedore allocations (malloc()
in most practical cases) fail.
User expectations are that private object require virtually no cache memmory.
Ref: https://github.com/varnishcache/varnish-cache/issues/2964
- Make the Transient Stevedore limited to 100MB by default
- add a parameter
pass_prefetch
with 1MB default - make
pass_prefetch
adjustable from vcl asreq.pass_prefetch
- add a no-fail mode to stevedore allocations where the requester gets notified (via a CV) by the stevedore as soon as there is memory available again.
- use the no-fail mode for private objects