Today's virtualization options provide a wide variety to even virtualize business-critical enterprise applications. Distributed enterprise applications can easily be virtualized but require proper planning. Otherwise, you will end up with virtualized SharePoint Server Farm that does not scale well and perform badly.
This article will provide information on how to virtualize your production environment properly and will not necessarily cover development environments, as those tend to run in over-committed scenarios anyway.
The following table provides a simple overview of the SharePoint farm terminology:
Never ever start a SharePoint production deployment with a single multi-role SharePoint Server.
The following figure illustrates the architecture of a SharePoint Server 2013 environment example.
Capacity and Performance: These two key aspects are the most important aspects when you plan your SharePoint virtualization infrastructure. You need to plan for enough disk capacity to host all of the content databases and data that is cached to disk by the web server and application server roles. Your overall capacity should be planned at least for a three year period. The requirements for CPU and memory sizing of the virtual hosts depends on your server requirements. A virtual host should always be equipped to the physical maximum. If you leave CPU sockets empty, there is no guarantee that you will get the CPU for that socket in the future. The memory banks should be filled in the proper ratio per CPU as well. Otherwise, you will not be able to fully benefit from the virtualization of your servers.
Mostly all of the major vendors of hardware load balancers offer virtualized load balancers as well. As long as the virtual load balancer is not running on an over-committed host, and sufficient performance is provided, there is no legitimate reason to not virtualize a load balancer.
Especially when you maintain a large virtualization platform you are heavily interested to not add additional hardware complexity to your network infrastructure by adding hardware load balancers. Any additional layer of complexity adds an additional layer for support as well.
Some of the major vendors are (purely alphabetical):
Web servers are easy to scale because web servers generally provide much better performance by adding additional CPUs and memory resources. This is the reason why the webserver role within a SharePoint deployment is the easiest to scale out. Because it is so easy to just add additional resources it is not automatically the right approach. Performance-wise you will reach a point where adding an additional web server makes more sense. This decision if you extend the resources of an existing server or add a new virtual machine depends on the overall virtualization infrastructure and the available hardware resources.
Another important topic to think about is the migration of virtual machines between hosts and the high-availability functionality of your virtualization platform. A virtual machine can be moved between virtual hosts more quickly when the virtual machine is not over-sized. The larger the assigned resources are, the more time it takes to migrate a virtual machine. You need to keep this in mind not only for migrations due to maintenance reasons or virtual hosts fail-overs. The same is true when you utilize the automatic load balancing of virtual machines.
NUMA nodes are an additional important topic. Microsoft provides dedicated information to NUMA nodes SharePoint here. Even though the article is focusing on Hyper-V, the general NUMA node requirements are valid for other hyper-visor platforms as well. As per Microsoft performance can decrease by up to 8% when a virtual machine needs to access remote memory from another NUMA node.
The proper sizing of memory resources ensures that your web servers perform as expected. You need to ensure that the webserver does not require to swap memory and make heavy use of the page file. Any use of the page file results in unnecessary disk I/O. And depending on the disk subsystem the required I/O reduces the performance dramatically. Even though the operating system supports the hot-adding of virtual memory, not all application functions make use of added virtual memory. Some components recognized available memory during the start-up of the operating system and do not adjust themselves during run time (e.g. Distributed Cache).
Your SharePoint server running the webserver role should be configured with at least:
The CPU demand of SharePoint application servers depends heavily on the applications that are running on those servers. Some applications might be more CPU resource-intensive (e.g. Search), others might be more memory intensive. To find the proper sizing for your specific requirements you need to monitor the system resources not only on a general level (e.g. System CPU usage, system memory consumption) but on a more granular level (per service, per application pool, per worker process).
Your SharePoint server running the application server role should be configured with at least:
The virtualization of SQL Server is a separate topic that will be covered in more detail in a separate blog article. But it would be unfair to leave this section more or less empty.
First of all, it should be said that even SQL Server can be virtualized. If virtualizing SQL Server is an option for your IT infrastructure depends on the SQL Server and data warehouse design of your company. Some companies prefer to host SQL databases in central SQL Servers serving all data applications within the company. Other companies prefer to host SQL databases on different SQL servers and group those by SQL Server SLA and/or by the type of data stored in databases.
In this example, we assume that there are three SQL Server 2012 dedicated to SharePoint in use. The following table gives a brief overview of the recommended memory sizing for SQL Server virtual machines:
SQL Server 2012 provides a new functionality called AlwaysOn Availability Groups (AAG). The AAG provides a much better experience and performance when it comes to database fail-overs. But at the same time, you need to plan resource requirements in a different way than you were used to with classic Windows Clustering capabilities. An AAG does have a primary replica of a database and many secondary (passive) replicas of the same database.
AAGs can be operated in two different availability modes:
In our example we have two different AlwaysOn Availability Groups configured:
The SharePoint 2013 farm example ends up in the following virtual host demands:
3 x 100 GB (OS, SQL Server)
3 x 1 TB (Databases)
To be able to have a single virtual host in maintenance, but still have redundancy we need to plan for at least three virtual hosts. But even in this case one of the two can fail. Therefore you need to protect yourself from a failure while having on a virtual host in maintenance. The disk subsystem is connected to each host by fiber channel or iSCSI on a dedicated 10GB network.