Mailing List Archive

does varnish write objects to disk?
Varnish caches objects into *memory* and not disk right?

So there is no point in assigning a disk drive solely to varnish for
caching objects in an effort to improve performance?

Can anyone give a very high level of how Varnish works? I've read the
presentations and most of the archives but not very clear on this
topic.

Thanks,
Nagita
does varnish write objects to disk? [ In reply to ]
In message <b2990fb00701132209y2c38c1bemc96f45d587d9a7ae at mail.gmail.com>, "Nagi
ta Karunaratne" writes:

>Varnish caches objects into *memory* and not disk right?

No, varnish caches objects into "virtual memory" which means that
RAM acts as a cache for the disk.

--
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.
does varnish write objects to disk? [ In reply to ]
Poul-Henning Kamp wrote:
>>Varnish caches objects into *memory* and not disk right?
>
> No, varnish caches objects into "virtual memory" which means that
> RAM acts as a cache for the disk.

I guess the interesting detail is how eager the kernel is to write the
mapped memory to disk.

It would be a shame to spend time and IO bandwidth to write a 1G cache
out to disk if the box has 4G of RAM and would never need the RAM for
anything other than the cache, woudn't it?

--
Regards Flemming Frandsen - http://dion.swamp.dk - YAPH
does varnish write objects to disk? [ In reply to ]
In message <45ABC845.8010202 at partyticket.net>, Flemming Frandsen writes:
>Poul-Henning Kamp wrote:
>>>Varnish caches objects into *memory* and not disk right?
>>
>> No, varnish caches objects into "virtual memory" which means that
>> RAM acts as a cache for the disk.
>
>I guess the interesting detail is how eager the kernel is to write the
>mapped memory to disk.
>
>It would be a shame to spend time and IO bandwidth to write a 1G cache
>out to disk if the box has 4G of RAM and would never need the RAM for
>anything other than the cache, woudn't it?

The kernels I know of can be described as distinctively reluctant
to write things out.

--
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.
does varnish write objects to disk? [ In reply to ]
Thanks for your help. I take it you let the kernel manage as much as possible.

But I really want to know how I can improve performance in a
multi-cpu, multi-core processor systems running multiple cms-websites
in a virtual hosting configuration outside the scope of the kernel.

For example, a specific RAID configuration that will make it easier
for varnish. Or do I leave it all up to the kernel.

Is FreeBSD and Linux2.6 equally capable with respect to varnish?

Thanks,
Nagita


On 1/15/07, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> In message <45ABC845.8010202 at partyticket.net>, Flemming Frandsen writes:
> >Poul-Henning Kamp wrote:
> >>>Varnish caches objects into *memory* and not disk right?
> >>
> >> No, varnish caches objects into "virtual memory" which means that
> >> RAM acts as a cache for the disk.
> >
> >I guess the interesting detail is how eager the kernel is to write the
> >mapped memory to disk.
> >
> >It would be a shame to spend time and IO bandwidth to write a 1G cache
> >out to disk if the box has 4G of RAM and would never need the RAM for
> >anything other than the cache, woudn't it?
>
> The kernels I know of can be described as distinctively reluctant
> to write things out.
>
> --
> 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.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
does varnish write objects to disk? [ In reply to ]
In message <b2990fb00701151055v76e4983bma935611bebc8a7e0 at mail.gmail.com>, "Nagi
ta Karunaratne" writes:

>But I really want to know how I can improve performance in a
>multi-cpu, multi-core processor systems running multiple cms-websites
>in a virtual hosting configuration outside the scope of the kernel.
>
>For example, a specific RAID configuration that will make it easier
>for varnish. Or do I leave it all up to the kernel.

We have very little experience with these kinds of questions so far,
mainly because nobody has told usmuch about their experiences yet.

(This would be a good time for our users to chime in :-)

>Is FreeBSD and Linux2.6 equally capable with respect to varnish?

Until now I have not heard of measurable differences.

--
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.