best way to upgrade
Brad Oaks
bradoaks at gmail.com
Wed Apr 11 22:56:16 UTC 2007
If you're accepting the risks in running the latest on your production
environment and that's really what you want to do, I can think of a
scheme to spread out your pain of refilling the cache after a restart.
I'm assuming you only have one machine to run memcached on. Instead
of one large instance of memcached running, try running 4 smaller
instances, each on a different port. Then when you've got the new
shiny binary compiled, take down one of the 4 and replace it with a
daemon running the new binary. wait a while, monitor your database
load, etc. then move on to pool number 2, and so on.
If someone knows of a potential adverse interaction between different
versions of memcached running on the same server, speak up.
If you have a few hot keys you're retrieving a lot more often than the
others (you would likely not know this if you're currently using only
one pool), know that the load may not be evenly distributed among the
multiple pools/instances. You can inspect the stats for each instance
and get an idea of how their hit rates compare to one another before
you clear or restart them.
Good luck and let me/us know if you decide to try this route,
--bradoaks
On 4/11/07, rkmr.em at gmail.com <rkmr.em at gmail.com> wrote:
> i get it .. it is jus that memcache is so awesome.. and it doest feel all
> that good losing the cache.. when there is a 90+% hit rate!!
>
>
>
> On 4/11/07, mike <mike503 at gmail.com> wrote:
> > the idea of memcache is not a persistent cache... everyone keeps
> > butting heads with that concept :)
> >
> > if you're looking for a persistent cache that will use disks to back it
> up:
> > http://meta.wikimedia.org/wiki/Tugela_Cache
> > http://sharedance.pureftpd.org/project/sharedance
> >
> > however, you should have in your code to hit the database/data store
> > for the data if it's a cache miss and then update the cache - your
> > site may be a little bit slow while it's recaching, but that's the
> > point. it's not a reliable data store, it's a volatile way to save
> > trips to the database (it's just like RAM (volatile) vs. HD
> > (non-volatile))
> >
> >
> > On 4/11/07, rkmr.em at gmail.com <rkmr.em at gmail.com> wrote:
> > > i would like to always have the latest memcached development version/svn
> > > version running. right now i recompile memcache, kill memcache server
> and
> > > launch it again. i lose all the cache. i just have one server.. is there
> > > anyway for me not to lose the cache?
> >
>
>
More information about the memcached
mailing list