> On Thu, May 26, 2011 at 9:50 PM, Ben Greenberg <schna
...@gmail.com> wrote:
> > Hi all,
> > I'm using rack-cache in front of an image generation server. My cached
> > files are large (images) so I currently write both caches to disk. I
> > read that I can increase performance by putting the meta cache onto
> > memcached. The problem is that I already have many gigabytes cached;
> > the meta cache is currently about 1GB and I expect it to grow quite a
> > bit. I have two questions:
> > 1) If I switch the meta cache to memcached but keep the entity cache
> > in the same location, will rack-cache know not to regenerate the
> > entities?
> Yes. The metastore cache will need to fill in but the disk cache
> should not be rewritten.
> > Will this keep my cache relatively warm?
> I think it would result in each of the cached URLs being generated by
> the app in full once, even though the response won't need to be
> written to disk. It's hard to say how much this will impact your app's
> performance. If a relatively small percentage of URLs are being hit
> very often, it should warm up very quickly. Otherwise, it could take
> some time to rebuild the metastore cache.
> > 2) Are there any good alternatives to memcached for large meta caches?
> > Any particular filesystems better than others? Would it help to have
> > it on a separate volume from the entity cache?
> Depends on the type of disk, how much other activity is happening on
> it, amount of RAM for disk cache, etc. If you're on linux than using a
> tmpfs volume to back the metastore cache would probably be a nice win.
> You'll lose it on restart and tmpfs uses the kernel's vm subsystem so
> this will eat into RAM and eventually swap if RAM is low, but you
> won't be moving disk heads loading things from cache which will
> probably be a win.
> Ryan
Thanks for the replies. This is on Amazon EC2 with the stores on an