Tuesday, November 25, 2008

Virtualization with SQL server. Think before you start.

Sometimes I got the question if it is useful to virtualize your SQL Servers. This is a valid question. There are a lot of reasons to virtualize your server park. So why not your SQL Servers. I have some tips when you plan to start virtualization with SQL Server:

  • Check if your SQL Server version is supported by Microsoft on the Virtualization platform you are going to use. Read this official web log for Microsoft PSS SQL. This blog will explain the support policies from Microsoft regarding SQL Server running in a hardware virtualization environment.
  • Do you have experience with virtualization with other applications? If not start with some 'non business critical' applications.
  • Read the best practices of SQL 2008 on Hyper-V.
  • With the use of virtualization, a new dimension of hardware capacity is introduced: The configuration of the resources of the Hyper-V machine. I will explain with one example:
    Assume 4 servers are virtualized on one physical box with 2 processors and Hyper-V installed. Within Hyper-V you have configured that each guest operating system is allowed to use a maximum of 25% of the CPU power of the Hyper-V machine. The first guest operating system has a CPU utilization of 100% and the other 3 guest operating systems have a CPU utilization of 0%. The physical machine will have a CPU utilization of 25%. In the first guest operating system you can make the conclusion that you have a CPU bottleneck. However this is maybe caused by a wrong Hyper-V configuration. Does the other 3 guest operating system really need 25% of the CPU power of the Hyper-V machine? 
    Beside the regular performance counters of your guest operating system, you need to monitor Hyper-V performance to get a true measure of resource usage. 
  • Convince yourself that you are able to find the performance bottleneck in a non virtualized SQL Server environment. If not, improve your skills to find the performance bottleneck before implementing virtualization.
  • Realize that virtualization will make your server configuration more complex.

3 comments:

Ronald Voets said...

Andre, good article. Someone wrote to me recently "On the use of virtual- or physical database servers we recommend using physical database servers, because the disk I/O performance is much better compared to virtual database servers. Disk I/O performance might drop up to 30% when using virtual database servers."

Any comment on that?

Aad 't Hart said...

What is virtualization?

André van de Graaf said...

@Ronald Voets: Of course you will have some overhead but I doubt if this is 30%. It also depends on the virtual server platform you are using.