Speed difference under load
John Kramlich
john.kramlich at gigoit.org
Thu Oct 25 07:15:19 UTC 2007
J A wrote:
> In my application I've noticed something weird. When testing it with
> one user, the memcached page loads in like 1 second, but when I use a
> load testing software and put 20 simultaneous users on it, the page
> load goes to 0.01 second, even though the server load has gone up.
>
> I'm puzzled by this. Anyone have similar experiences?
>
What load testing software are you using and what happens if you
configure that load testing software to emulate only a single user? If
you are running something like siege locally on your server then network
latency would be much lower than if you were running the same program on
a remote machine. That may be what makes the page load more slowly.
You may also want to profile you code and see how long returning results
from memcache takes. If using PHP you can get a benchmarking class from
PEAR and set start and stop markers before and after you memcache
related code. Then you can output the number of milliseconds it takes
to execute that code. You can do this for other parts of your code as
well. It certainly helps when figuring out where to spend time optimizing.
- John Kramlich
------------------------------
http://www.gigoit.org - Give and get free items within your community
More information about the memcached
mailing list