<html><body bgcolor="#FFFFFF"><div><br class="webkit-block-placeholder"></div><div> Depending on the language and runtime, you could almost count on it while libraries load and initialize and jits optimize.</div><div><br class="webkit-block-placeholder"></div><div> Testers usually include some ramp-up time where things sort of warm-up before you actually start capturing metrics.<br><br>-- <div>Dustin Sallings (mobile)</div></div><div><br>On Oct 26, 2007, at 20:24, "K J" <<a href="mailto:sanbat@gmail.com">sanbat@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div>Ok I tested this, and found that the very first memcache get request always takes up 1 second. All subsequent gets in the same page are fast. Does anyone know what could cause the first memcache get request to slow down like this?
</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 10/25/07, <b class="gmail_sendername">John Kramlich</b> <<a href="mailto:john.kramlich@gigoit.org"><a href="mailto:john.kramlich@gigoit.org">john.kramlich@gigoit.org</a></a>> 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>> In my application I've noticed something weird. When testing it with<br>> one user, the memcached page loads in like 1 second, but when I use a
<br>> load testing software and put 20 simultaneous users on it, the page<br>> load goes to 0.01 second, even though the server load has gone up.<br>><br>> I'm puzzled by this. Anyone have similar experiences?
<br>><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? 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. 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. 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. Then you can output the number of milliseconds it takes<br>
to execute that code. You can do this for other parts of your code as<br>well. It certainly helps when figuring out where to spend time optimizing.<br><br>- John Kramlich<br>------------------------------<br><a href="http://www.gigoit.org">
<a href="http://www.gigoit.org">http://www.gigoit.org</a></a> - Give and get free items within your community<br></blockquote></div><br>
</div></blockquote></body></html>