Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2009 10:22:15 -0400
From:      John Nielsen <lists@jnielsen.net>
To:        freebsd-questions@freebsd.org
Cc:        Steve Bertrand <steve@ibctech.ca>
Subject:   Re: VMWare ESX and FBSD 7.2 AMD64 guest
Message-ID:  <200907241022.15985.lists@jnielsen.net>
In-Reply-To: <4A68F5CF.8030303@ibctech.ca>
References:  <4A68F5CF.8030303@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 23 July 2009 19:44:15 Steve Bertrand wrote:
> This message has a foot that has nearly touched down over the OT
> borderline.
>
> We received an HP Proliant DL360G5 collocation box yesterday that has
> two processors, and 8GB of memory.
>
> All the client wants to use this box for is a single instance of Windows
> web hosting. Knowing the sites the client wants to aggregate into IIS, I
> know that the box is far over-rated.
>
> Making a long story short, they have agreed to allow us to put their
> Windows server inside of a virtual-ized container, so we can use the
> unused horsepower for other vm's (test servers etc).
>
> My problem is performance. I'm only willing to make this box virtual if
> I can keep the abstraction performance loss to <25% (my ultimate goal
> would be 15%).
>
> The following is what I have, followed by my benchmark findings:
>
> # 7.2-RELEASE AMD64
>
> FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009
>     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
>
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Xeon(R) CPU            5150  @ 2.66GHz (2666.78-MHz
> K8-class CPU)
>   Origin = "GenuineIntel"  Id = 0x6f6  Stepping = 6
>
> usable memory = 8575160320 (8177 MB)
> avail memory  = 8273620992 (7890 MB)
>
> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP): APIC ID:  1
>  cpu2 (AP): APIC ID:  6
>  cpu3 (AP): APIC ID:  7:

Did you give the VM 4 virtual processors as well? How much RAM did it have? 
What type of storage does the server have? Did the VM just get a .vmdk on 
VMFS? What version of ESX?

> Benchmarks:
>
> # time make -j4 buildworld (under vmware)
>
> 5503.038u 3049.500s 1:15:46.25 188.1%   5877+1961k 3298+586716io 2407pf+0w
>
> # time make -j4 buildworld (native)
>
> 4777.568u 992.422s 33:02.12 291.1%	6533+2099k 25722+586485io 3487pf+0w

Note that the "user" time is within your 15% margin (if you round to the 
nearest percent). The system time is what's running away. My guess is that 
that is largely due to disk I/O and virtualization of same. What you can do 
to address this depends on what hardware you have. Giving the VM a raw 
slice/LUN/disk instead of a .vmdk file may improve matters somewhat. If you 
do use a disk file be sure that it lives on a stripe (or whatever unit is 
relevant) boundary of the underlying storage. Ways to do that (if any) depend 
on the storage. Improving the RAID performance, etc. of the storage will 
improve your benchmark overall, and may or may not narrow the divide.

The (virtual) storage driver (mpt IIRC) might have some parameters you could 
tweak, but I don't know about that off the top of my head.

> ...both builds were from the exact same sources, and both runs were
> running with the exact same environment. I was extremely careful to
> ensure that the environments were exactly the same.
>
> I'd appreciate any feedback on tweaks that I can make (either to VMWare,
> or FreeBSD itself) to make the virtualized environment much more efficient.

See above about storage. Similar questions come up periodically; searching the 
archives if you haven't already may prove fruitful. You may want to try 
running with different kernel HZ settings for instance.

I would also try to isolate the performance of different components and 
evaluate their importance for your actual intended load. CPU and RAM probably 
perform like you expect out of the box. Disk and network I/O won't be as 
close to native speed, but the difference and the impact are variable 
depending on your hardware and load.

A lightly-loaded Windows server is the poster child of virtualization 
candidates. If your decision is to dedicate the box to Winders or to 
virtualize and use the excess capacity for something else I would say it's a 
no-brainer if the cost of ESX isn't a factor (or if ESXi gives you similar 
performance). If that's already a given and your decision is between running 
a specific FreeBSD instance on the ESX host or on its own hardware then 
you're wise to spec out the performance differences.

HTH,

JN



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907241022.15985.lists>