Optimising use and using multiple memcache servers in a pool

Jure Petrovic fonz at siol.net
Mon Jan 22 08:51:25 UTC 2007



When talking about heavily used objects, expiration time doesn't have a
lot of influence. Even cache size is more important.

Since Memcached is using LRU (least recently used) algorithm to
overwrite objects, you can be sure that first object to be overwritten
when neccessary, will be the least-recently-used one. So you don't have
to worry that your most accessed object will be updated.

But it seems, that you already figured out by the end of the previous
mail :)


Regards, 
Jure 

On Mon, 2007-01-22 at 08:28 +0000, Alan Jay wrote:
> I suppose another question would be if you set the "expiry time"
> differently
> on the peak and tail elements if you can ensure that the peak ones are
> more
> likely to be in the cache than the tail - which would expire in
> preference. 

OK - so an object that is used more frequently will not be thrown away
when
new data is required/requested it will throw away data that is used
least
first (is that correct).

> If you want lesser-used objects to be cached less, then you could give
> them a shorter expiration time than heavily used objects, but even
> without that, frequently used object should push them out of the cache
> or they will expire.

OK excellent that was my hope.



More information about the memcached mailing list