That covers it, my point was I was watching the cache grow when I was expecting it to stay relatively flat, due to expiration. The lazy expiration covers it!<br><br>Thanks,<br><br>Gavin<br><br><div><span class="gmail_quote">
On 5/7/07, <b class="gmail_sendername">Jehiah Czebotar</b> <<a href="mailto:jehiah@gmail.com">jehiah@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 5/7/07, Gavin M. Roy <<a href="mailto:gmr@myyearbook.com">gmr@myyearbook.com</a>> wrote:<br>> Hello,<br>><br>> Am running memcached in production on a fairly large site and am noticing<br>> that while I'm putting in expirations, the size of the utilization is
<br>> growing disproportionately with the expected growth of the cache based upon<br>> what we implemented it for. By some testing, it seems that items that are<br>> expired from the cache are only removed when the get request is sent. Is
<br>> our interpretation of this behavior correct, or does content in the cache<br>> expire based upon the timestamp through some internal stack? If it's the<br>> later how often does the daemon run through to get rid of expired content?
<br>><br>> TIA,<br>><br>> Gavin<br>><br><br>I'm not sure what you mean when you say utilization is growing<br>disproportionately... but i can answer the second half of the question<br><br>memcached uses a lazy expiration, which means it uses no extra cpu
<br>expiring items. When an item is requested (a get request) it checks<br>the expiration time to see if the item is still valid before returning<br>it to the client.<br><br>similarly when adding a new item to the cache, if the cache is full,
<br>it will look at for expired items to replace before replacing the<br>least used items in the cache.<br><br>--<br>Jehiah<br></blockquote></div><br>