Cache size

Ketil Froyn ketil at froyn.name
Tue Mar 16 11:47:46 CET 2010


Hi Martin,

Thanks! :) My main concern has to do with adding one more level of
complexity into the service I'm running, as a problem with my Varnish
configuration could result in downtime of the service.

What I'm considering is to put Varnish in front of a static webserver
which has about 500GB of images and preview files, distributed across
a few hundred thousand files of anything from a couple of Kb to a few
Mb. It's all pretty static content, but more is added all the time,
some files are fetched a lot more often than others, and new files
tend to be fetched a fair bit. Since there's that much data, I'm
concerned about running into some thrashing issues during traffic
peaks, for instance.

Assuming the definition of "working data set" is approximately the
size of all distinct files loaded in TTL time (eg one hour), plus a
bit extra per file for headers etc, let's say that the working data
set size is about 10GB. Would I get away with a varnish server with
1GB RAM and 15-20GB allocated disk space, just to have a bit of
headroom?

Cheers, Ketil

On Tue, Mar 16, 2010 at 8:09 AM, Martin Boer <martin.boer at netclever.nl> wrote:
> Ketil,
>
> If the server has enough diskspace it doesn't really matter.
> I use 15GB as that is the free space of the largest disk partition on my
> smallish server.
> I'd suggest you just start using and finetuning varnish. And if you can
> spare the diskspace,
> don't be shy about it. Just throw a lot at varnish.
>
> You might or might not want to cache everything, might want to cache the
> same content multiple times for several browsertypes, might want to cache
> some stuff only for an hour while other stuff for ages and ages.
> All these things will affect the amount of cache you use.
>
> Varnish will increase performance from your current webserver(s), so you've
> won already. :)
>
> Regards,
> Martin
>
> Ketil Froyn wrote:
>>
>> Hi,
>>
>> The Varnish FAQ says:
>>
>> Q: How large a cache do I need?
>> A: You should have a cache at least the size of your working data set. ...
>>
>> Is there a good way to determine the size of the working data set, so
>> that I can be pretty sure I'm allocating the right amount of resources
>> for this?
>>
>> Regards, Ketil
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>>
>>
>>
>
>




More information about the varnish-misc mailing list