<div>Ok I tested this, and found that the very first memcache get request always takes up 1 second.&nbsp; All subsequent gets in the same page are fast.&nbsp; Does anyone know what could cause the first memcache get request to slow down like this?
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/25/07, <b class="gmail_sendername">John Kramlich</b> &lt;<a href="mailto:john.kramlich@gigoit.org">john.kramlich@gigoit.org</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">J A wrote:<br>&gt; In my application I&#39;ve noticed something weird.&nbsp;&nbsp;When testing it with<br>&gt; one user, the memcached page loads in like 1 second, but when I use a
<br>&gt; load testing software and put 20 simultaneous users on it, the page<br>&gt; load goes to 0.01 second, even though the server load has gone up.<br>&gt;<br>&gt; I&#39;m puzzled by this.&nbsp;&nbsp;Anyone have similar experiences?
<br>&gt;<br><br>What load testing software are you using and what happens if you<br>configure that load testing software to emulate only a single user?&nbsp;&nbsp;If<br>you are running something like siege locally on your server then network
<br>latency would be much lower than if you were running the same program on<br>a remote machine.&nbsp;&nbsp;That may be what makes the page load more slowly.<br><br>You may also want to profile you code and see how long returning results
<br>from memcache takes.&nbsp;&nbsp;If using PHP you can get a benchmarking class from<br>PEAR and set start and stop markers before and after you memcache<br>related code.&nbsp;&nbsp;Then you can output the number of milliseconds it takes<br>
to execute that code.&nbsp;&nbsp;You can do this for other parts of your code as<br>well.&nbsp;&nbsp;It certainly helps when figuring out where to spend time optimizing.<br><br>- John Kramlich<br>------------------------------<br><a href="http://www.gigoit.org">
http://www.gigoit.org</a>&nbsp;&nbsp;- Give and get free items within your community<br></blockquote></div><br>