phk at phk.freebsd.dk
Tue Aug 1 19:49:28 CEST 2006
In message <3033.193.69.165.4.1154452266.squirrel at denise.vg.no>, "Anders Berg"
>since I am still at home with a bad back (I can only sit for small amounts
>of time in a chair), I have been reading some papers on prefetching and
>cache algorithm's. I have concluded this:
>1. Prefetching is only needed if one wants to minimalize latency for
>doc's, or to prime a cache. Obvious maybe, but I can't think of any other
>use. Bandwith is hardly a problem to backend, and size is not to big a
>deal for most cases.
With the architecture I/we have chosen, prefetching will help us avoid
the momentary pile-up that would happen when a much used document
As far as I can tell, this is not very important to VG, but doing
proper prefetching will improve responsetime a bit when those
>2. If we wanna use a algorithm, we would use a old one.
I fully agree.
My plan was to use one that said "if the document has been used
more than 2 times in the previous incarnation, then prefetch,
otherwise discard." for some suitable value of 2.
Maybe a frequency is better: If document has been used more
than once per minute in previous incarnation, then prefetch,
Either way, the policy will be in VCL...
Anyway, for now prefetching is not on the list of 1.0 things
so it's not very important.
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev