• No results found

Applications in a Virtualized Environment

Within companies, we find applications with varying levels of criticality. Some servers—such as database servers—are critical because they contain information essential to the company’s business needs. Databases are often part of a multitier application. They are the reference in managing work processes, notably in SAP environments.

For a long time, virtualization was used for test, development, and receipt servers within the environment. Today, the adoption curve shows the generalization of virtualization for all types of servers and application loads. Because vSphere 5 VMs support up to 32 vCPUs, 1 TB of memory, 1,000,000 IOPS, and 36 Gbps for the network, they easily meet the performance requirements of the very vast majority of applications—more than 95% according to VMware. There is no longer any obstacle to migrating to a virtualized environment for critical applications, as the vast majority of applications can be virtualized without any problem.

Some applications, however, have very precise requirements that must be taken into account so these can be integrated into a virtualized environment in the best possible way.

Oracle and SQL D atabases

• CPU virtualization adds only a small amount of overhead. At the host level, enable hyper- threading

• Memory set reservations to avoid memory overcommitment. Size the memory suggested by DBA Administrator. Refer to the manufacturers’ recommendations for the number of vCPUs and memory within the VM.

• Network: Use the VMXNET3 paravirtualized NIC. VMXNET3 is optimized for virtual environments and designed to provide high performance

• Storage: Create dedicated datastores to service database workloads. Enable jumbo frames for IP-based storage using iSCSI and NFS, align VMFS properly, use Paravirtualized SCSI adapters for Oracle data files with demanding workloads. Applications requiring high levels of

performance can be put onto dedicated datastores with dedicated logical unit numbers (LUN s) and can keep certain basic rules, such as not mixing types of I/O disks.

• For databases that generate random read type I/O, use RAID 5 or 5/0 for databases with a read/write ratio (R/W) of 70%R/30%W.

• Log files will follow a sequential write profile, use RAID 1 or 1/0 for logs. It is preferable to work with disks in Raw Device Mapping (RDM) mode, but VMDK disks can be also used.

Note

When I/O are mixed, disk heads move too much and latency develops, which hinders performance.

Refer to the manufacturers’ recommendations for the number of vCPUs in the VM and for memory. Consideration must be given to the fact that several types of VMs can be mixed within the environment. Therefore, it is crucial to implement QoS for some critical VMs, notably for databases.

Are Oracle Databases Supported in vSphere 5?

For a long time, the support of Oracle databases in virtualized environments was very confusing and subject to interpretation. Officially, Oracle databases are supported (by Oracle) in VMs only as of the 11G version (precisely 11.2.0.2). Any previous version is officially not supported.

For earlier versions, however, when an incident is reported to Oracle support and the problem is known to Oracle, technical support will provide an appropriate solution. If the problem is not known to Oracle, technical support reserves the right to ask to replicate the problem on physical hardware to prove it is not related to the virtualization layer. In practice, only a few cases require replication in a physical environment.

Oracle Licensing in VMware

Attention must be paid to the licensing mode of Oracle databases in a virtualized environment; licensing is based on all processors on which VMs can function. In an ESXi cluster, the VM can potentially function on any cluster server, which means a license is required for all processors in the cluster.

Example

In the case of an ESXi cluster with three nodes and two CPUs per node, Oracle licenses will be required for six CPUs. However to decrease Oracle licensing costs, administrators can use a host affinity earlier in this chapter) to isolate the vMotion domain of Oracle workloads and only license the host server on which that workload has an “affinity” to be run on.

To find out more about licensing, see the following article:

http://bartsjerps.wordpress.com/2011/11/09/oracle-vmware-licensing-cost-savings. Exchange

With Exchange 2010, a VM with 32 vCPUs greatly exceeds the highest configuration levels required by Microsoft; for a simple role, 12 CPUs are required, and for multiple roles, 24 CPUs are required.

and 2 vCPUs), each supporting 2000 users. This means a physical server can have up to 16,000 mailboxes (8 VMs, each supporting up to 2000 mailboxes). In a physical environment, a single physical server does not support more than 8000 mailboxes. Increasing a server’s capacity cannot be leveraged to increase the number of mailboxes within the same server.

SAP

Because SAP applications use a great deal of memory, VMware recommends not using memory overcommitment. To force this, a reservation must be made for the VM using the same value as the memory configured in the VM. The memory must be sized based on the memory actually used.

A sizing tool is available athttp://service.sap.com/sizing. This allows the determination of Server Agent Plugin Synchronization (SAPS) prerequisites. The sizing model is the same whether the environment is physical or virtual.

Some other considerations for SAP applications:

• The configuration of VMs in several vCPUs enables the use of the multithreading features of applications if they offer such support (which is usually the case). This leads to an increase in performance.

• Regarding storage, it is possible to mix RDM and vmdk disks in a SAP environment and to prefer one LUN mapping for each VM, to avoid I/O contentions.

• Using the vmxnet driver in VMs is recommended for improved performance.

• The SAP Central Services component is a good choice for protection using the vSphere FT functionality in a VM with one vCPU.

Active Directory

Active Directory (AD) works very well in a VM. An important point to consider, however, is the synchronization with the time clock. All Active Directory activities (for example, changing

passwords, replication services, and so on) depend on the time at which these operations must occur. Kerberos is at the heart of any Active Directory authenticationrequest. It demands the AD client clock be synchronized through the time synchronization service. The implementation of Kerberos tolerates a maximum discrepancy of five minutes.

This dependency on time can cause issues in a VM. When a VM is functioning, it requires CPU cycles, and time heartbeats are provided to the VM. If a VM has no activity, however, it solicits no CPU cycles from the host server. The host server provides none, and the VM lags behind the time (because time heartbeats are not sent to the VM by the physical host). A phenomenon called timekeeping occurs, and the VM experiences a time discrepancy.

Two methods can be used to solve this issue: • Using Windows Time services

• Using VMware Tools

To find out more, refer to VMware’s Knowledge Base: KB 1318 and KB 1006427. The following best practices are recommended with AD:

• Do not pause AD VMs.

• Do not take snapshots of AD VMs because this can cause corruption and hinder performance.

• Use vSphere HA; because it has priority over all other VMs in the infrastructure, it has to be set to high priority.

• Configure the VM with one vCPU with a vmxnet3 virtual network card. • Keep the PDC emulator as a physical server.

M icrosoft Cluster Service in a vSphere 5 Environment

Microsoft Cluster Service (MSCS) clustering services can be preserved between two VMs within the virtualized environment. N ote, however, that MSCS functions only with disks using the RDMp mode (storage-area network Fibre Channel [SAN FC] or iSCSI, but notNetwork File System [NFS]). Snapshots and clones cannot be used due to the use of RDMp disks.

Can MSCS be replaced by vSphere HA? In theory, no, because granularity is different. MSCS monitors an application and restarts it if it functions in HS, while vSphere HA monitors physical ESXi servers and reboots VMs in cases where the server is down (even if it is possible to also detect a crashed OS or application in some cases).

Some companies, however, have abandoned MSCS because the implementation of clustering makes the full use of it cumbersome. (For example, scripts must be developed, each OS update must be tested.) Moreover, MSCS requires the protected application to becluster aware, and only a few applications are, whereas vSphere HA works for any type of VM (legacy application). N ote that with both vSphere HA and MSCS, in the case of a failure, the application will experience an outage but will start back up automatically.

Some companies prefer implementing vSphere HA. It does not provide the same detection granularity, but it is easier to manage on a day-to-day basis.

Note

Some companies consider that if the OS becomes corrupted, vSphere HA is no longer useful. This is true, but restoring a VM can be done much faster than rebuilding a physical machine. If a company considers this restoration time as excessive, implementing MSCS clustering is recommended.

Transforming the D atacenter

Virtualization has transformed the datacenter, allowing unprecedented flexibility in x86 computing. Memory over commitment allows more VMs to run on a host, and vSphere offers technologies like ballooning to help maximize the ability to overcommit memory. The ability to manage VMs in an enhanced way goes beyond memory, and also is available for CPU and network resources. vSphere provides for more than just enhanced management, and can improve the availability of VMs by allowing them to move between physical ESXi hosts. This allows for in-service hardware upgrades and the ability to manage performance by distributing VMs. With multiple options for network switching, it is important to work closely with your organizations network experts to make the right choices.

With so many capabilities, almost any application can be run in a vSphere 5 VM. Microsoft SQL, Oracle, Exchange, SAP, and Active Directory are commonly deployed in virtual machines, and with the right planning, can perform even better than their physical counterparts.

Chapter 5. High Availability and Disaster Recovery Plan

Application availability is essential for the proper functioning of a company’s IT system.

Implementing a secure hardware architecture that leverages the advanced features of vSphere 5 helps to reach high levels of service and rapid business recovery if disaster strikes the production site.