Re: VM benchmarks

From: Ariel <ariel#bidcactus.com>
Date: Fri, 29 Oct 2010 14:36:11 -0400


On Oct 28, 2010, at 5:38 PM, Cyril Bonté wrote:
> I reproduced nearly the same environment as you described and could not
> reproduce this latency (only 1 nginx instance in my case).

First, I want to say thank you for your tests! I learned a lot from seeing what you did.

The VirtualBox server I was using before is in another building. I've asked many times but still don't know much about how it is set up. I just know that if I ask for a new VM for development, the guy will set one up for me. So to come closer to the tests you did, I installed VirtualBox at home. Also, I added "option http-server-close" to haproxy.cfg because this is closer to what it would be in my desired environment. (And I also realize my first test didn't need two backends because without this option, it would maintain keepalive with the backend server and not switch until my keepalive expired. I feel a little silly!)

My computer at home:



OS: Windows 7 Ultimate x64
CPU: Intel(R) Core(TM) i5 CPU 750 @ 2.67Ghz Memory: 4Gb DDR3-1066

VM1:



Virtualbox 3.2.10
OS: Ubuntu 10.04 (new install)
Running haproxy 1.4.8
Kernel: 2.6.32-25-server #45-Ubuntu SMP x86_64 GNU/Linux 1 CPU, 512MB RAM, VT-x Enabled
Adapter Type: Intel PRO/1000 MT Desktop (82540EM) (Bridged)

VM2 (same as above):



Running nginx 0.7.65

I ran my browser from the host OS clicking the button to call ajax and my results were much like yours. Almost always 2-3ms for every HTTP 200 status response directly to nginx (no proxy). Going through haproxy gave 3-4ms very consistently.

I tried connecting from my office to the computer at home, directly to nginx I got 10ms-11ms (8ms low, 14ms high). Through haproxy was exactly the same.

So I think the high latency that I saw in my first VirtualBox environment (I still get the same strange results today, 150ms or so when using haproxy) is because other VMs on that computer are using lots of resources or maybe it is not configured correctly. I tried running Rosetta#home on my computer at home (on the host OS) to maintain very high CPU usage and ran the tests again. I got the same results as before... everything was very fast and haproxy is barely noticeable.

I also tried the `ab` utility you showed me but at home I have a D-Link router and it explodes when getting 10 requests per second. This was the best result that finished without crashing from the office: `ab -n1000 -c1 http://<my public ip address at home>:9091/ajax.txt` Requests per second: 8.48 [#/sec] (mean) Time per request: 117.906 [ms] (mean)

I will try to make a network as close to what we have in production right now and keep testing. Thank you very much for showing me how you did your tests! What other tools like ab should I try? I see JMeter a lot in google, and one person mentioned httperf.

-a Received on 2010/10/29 20:36

This archive was generated by hypermail 2.2.0 : 2010/10/29 20:45 CEST