<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">john.kramlich@gigoit.org</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">
http://www.gigoit.org</a> - Give and get free items within your community<br></blockquote></div><br>