Hello - <br><br>We are well into testing a memcached as a means to offload read requests from our database.&nbsp; We are logging each query result to disk, and have seen an interesting trend:<br><br>It seems that for a lot of the very small db queries, there is an increase in latency when we pull the data from the memcache.&nbsp; Whereas a simple &quot;select a from b where primary key =&#39;x&#39; &quot;
was taking ~300ms to get from our database over a simple (and very busy) GigE switch, the memcache is running on localhost and is seeing &quot;query&quot; times more like ~600ms.<br><br>We tested it on many batch runs, and it seems that using the memcache (as configured) causes a performance hit of approximately 20%.&nbsp; This is for a CPU-bound process that uses 100% of all CPU cores in both testing scenarios.
<br><br>I wanted to check with the group and see if this was typical when making the transition.&nbsp; I didn&#39;t see any mention of performance decrease in the literature, so wanted to reach out to those of you who are using it and working on it every day.&nbsp; There is obviously real risk that the delay is due to the way either the daemon is implemented on our systems, OR in the way we implemented the cursor emulation in our code.
<br><br>Here is a snapshot of the result of checking the stats via PHP for those of you who might be curious:<br><br>&nbsp;[localhost:11211] =&gt; Array<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [pid] =&gt; 22963<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [uptime] =&gt; 179777
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [time] =&gt; 1184966166<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [version] =&gt; 1.2.2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [pointer_size] =&gt; 64<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [rusage_user] =&gt; 416.616664<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [rusage_system] =&gt; 772.915498<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [curr_items] =&gt; 2337
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [total_items] =&gt; 4127199<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [bytes] =&gt; 1203526<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [curr_connections] =&gt; 19<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [total_connections] =&gt; 564102<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [connection_structures] =&gt; 35<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [cmd_get] =&gt; 48904240<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [cmd_set] =&gt; 4127199<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [get_hits] =&gt; 48863204<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [get_misses] =&gt; 41036<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [evictions] =&gt; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [bytes_read] =&gt; 3804455209
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [bytes_written] =&gt; 36060479069<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [limit_maxbytes] =&gt; 1073741824<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [threads] =&gt; 4<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br><br><br>Thank you in advance for your help.&nbsp; I appreciate it.<br><br>Andrew B. Westmoreland
<br>Founder<br>Progressing Markets<br><br><br><br>