<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">That depends entirely on what you are doing.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Another approach is to use both memcache and local cache, so within a transaction for example (loose use of the term transaction) you use in memory but for longer living things you use memcache.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers</DIV><DIV>Artur</DIV><DIV><BR><DIV><DIV>On Sep 26, 2006, at 7:14 AM, anand wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">To make my point clear, currently I end up replicating the cache. Using memcached will help me curb over this problem. But the question is that would using memcached affect the performance considerably or should I rather use the resident cache and end up sacrificing memory. <BR><BR><DIV><SPAN class="gmail_quote">On 9/26/06, <B class="gmail_sendername">Ivan Krstić</B> <<A href="mailto:krstic@solarsail.hcs.harvard.edu">krstic@solarsail.hcs.harvard.edu</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;"> anand wrote:<BR>> LRU: 10,000 reads averages to about 16 ms that is 0.0016 ms per read<BR>> Memcached: 10,000 reads averages to about 2837 ms that is 0.28 ms per read<BR><BR>This comparison doesn't make even a hint of sense. If an in-program LRU <BR>cache is adequate for your use case, don't look at memcached.<BR><BR>If you need your resident cache set to be (much) larger than the amount<BR>of RAM in your machine, or you need machine redundancy, or you need to<BR> distribute rather than replicate the cache, then memcached is the right<BR>answer.<BR><BR>--<BR>Ivan Krstić <<A href="mailto:krstic@solarsail.hcs.harvard.edu">krstic@solarsail.hcs.harvard.edu</A>> | GPG: 0x147C722D<BR> </BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>