Database Virtualization

Similar documents
Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Technical Paper. Moving SAS Applications from a Physical to a Virtual VMware Environment

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Getting Even More Out of OpenEdge in a Virtualized Environment

Scaling in a Hypervisor Environment

Balancing CPU, Storage

Unifying Information Security

Full and Para Virtualization

Getting the Most Out of Virtualization of Your Progress OpenEdge Environment. Libor Laubacher Principal Technical Support Engineer 8.10.

Monitoring Databases on VMware

Oracle Database Scalability in VMware ESX VMware ESX 3.5

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Squeezing The Most Performance from your VMware-based SQL Server

A cure for Virtual Insanity: A vendor-neutral introduction to virtualization without the hype

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

W H I T E P A P E R. Performance and Scalability of Microsoft SQL Server on VMware vsphere 4

COS 318: Operating Systems. Virtual Machine Monitors

Performance Management in the Virtual Data Center, Part II Memory Management

Hyper-V vs ESX at the datacenter

Advanced VMware Training

Microsoft Office SharePoint Server 2007 Performance on VMware vsphere 4.1

Enabling Technologies for Distributed and Cloud Computing

Cloud Computing CS

Enabling Technologies for Distributed Computing

Running vtserver in a Virtual Machine Environment. Technical Note by AVTware

A Comparison of VMware and {Virtual Server}

IOS110. Virtualization 5/27/2014 1

RUNNING vtvax FOR WINDOWS

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

Performance Best Practices for VMware vsphere 4.0 VMware ESX 4.0 and ESXi 4.0 vcenter Server 4.0 EN

SQL Server Virtualization

Performance Management in a Virtual Environment. Eric Siebert Author and vexpert. whitepaper

VirtualclientTechnology 2011 July

Microsoft Exchange Solutions on VMware

vsphere Performance Best Practices

An Oracle Technical White Paper June Oracle VM Windows Paravirtual (PV) Drivers 2.0: New Features

Virtualization. Pradipta De

Chapter 14 Virtual Machines

XenApp on VMware: Best Practices Guide. Citrix XenApp on VMware Best Practices Guide

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Performance Analysis Methods ESX Server 3

Virtualizing Performance-Critical Database Applications in VMware vsphere VMware vsphere 4.0 with ESX 4.0

Hyper-V R2: What's New?

Virtualization. Types of Interfaces

Oracle Databases on VMware Best Practices Guide

Performance Evaluation of VMXNET3 Virtual Network Device VMware vsphere 4 build

Networking for Caribbean Development

9/26/2011. What is Virtualization? What are the different types of virtualization.

Merge Healthcare Virtualization

Avoiding Performance Bottlenecks in Hyper-V

Virtualization for Cloud Computing

Hypervisor Software and Virtual Machines. Professor Howard Burpee SMCC Computer Technology Dept.

Basics of Virtualisation

Intro to Virtualization

Virtualization and the U2 Databases

How To Create A Cloud Based System For Aaas (Networking)

Virtualization. Dr. Yingwu Zhu

Understanding Memory Resource Management in VMware vsphere 5.0

Virtualization and Performance NSRC

Simplifying Storage Operations By David Strom (published 3.15 by VMware) Introduction

International Journal of Advancements in Research & Technology, Volume 1, Issue6, November ISSN

Virtual Machines Fact Sheet

Operating Systems Virtualization mechanisms

Microsoft SQL Server and VMware Virtual Infrastructure BEST PRACTICES

VI Performance Monitoring

Models For Modeling and Measuring the Performance of a Xen Virtual Server

Distributed Systems. Virtualization. Paul Krzyzanowski

BridgeWays Management Pack for VMware ESX

Virtualization. Michael Tsai 2015/06/08

Philips IntelliSpace Critical Care and Anesthesia on VMware vsphere 5.1

Virtualizing a Virtual Machine

Performance Best Practices for VMware Workstation VMware Workstation 7.0

Running Philips IntelliSpace Portal with VMware vmotion, DRS and HA on vsphere 5.1 and 5.5. September 2014

KVM: Kernel-based Virtualization Driver

Vmware Training. Introduction

Below an example and some guiidelines/tips on interpretation of perfoemance analysis using ESXTOP. ID GID NAME NWLD %USED %RUN %SYS %WAIT %VMWAIT%RDY

VMware vsphere vmotion Architecture, Performance and Best Practices in VMware vsphere 5

Virtual Machines. COMP 3361: Operating Systems I Winter

Vocera Voice 4.3 and 4.4 Server Sizing Matrix

SAP Solutions on VMware Best Practices Guide

Maximum vsphere. Tips, How-Tos,and Best Practices for. Working with VMware vsphere 4. Eric Siebert. Simon Seagrave. Tokyo.

The Future of Virtualization Technology. Stephen Alan Herrod VP of Technology VMware

Providing Self-Service, Life-cycle Management for Databases with VMware vfabric Data Director

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

What s New with VMware Virtual Infrastructure

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

The best platform for building cloud infrastructures. Ralf von Gunten Sr. Systems Engineer VMware

Microsoft Hyper-V chose a Primary Server Virtualization Platform

Computing in High- Energy-Physics: How Virtualization meets the Grid

CSE 501 Monday, September 09, 2013 Kevin Cleary

TGL VMware Presentation. Guangzhou Macau Hong Kong Shanghai Beijing

Directions for VMware Ready Testing for Application Software

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

Transcription:

Database Virtualization David Fetter Senior MTS, VMware Inc PostgreSQL China 2011 Guangzhou

Thanks! Jignesh Shah Staff Engineer, VMware Performance Expert Great Human Being

Content Virtualization Virtualized Resources VM Configuration Know Your * (Resources) Summary

Virtualization If running PostgreSQL on physical servers is like flying in open sky

Virtualization Then running PostgreSQL on Virtualized Environments is like flying in clouds (Welcome to Cloud Computing) May the Force be with You! (At least GPS, Radars, etc)

What is Virtualization? Virtualization (according to various people) Abstraction Division Emulation Exaggeration Query Virtualization for information and Best case: Refuses to answer Worse case: Lies

Physical resources used by databases

Know Your Resources and its Administrators Begin to know your virtual resource layer along with physical resources For Physical Resources we talk with System Administrator / Storage Administrator Now with Virtualization in the middle we also talk with Virtualization Environment Administrator

Selecting VM Configuration for PostgreSQL DB Server Be good Citizens Right-Size Configuration Try not to overcommit resources Check the available Physical resources Separate PGDATA and WAL into separate Virtual disks Select Thick allocations for Virtual disks used (space fully allocated)

Selecting VM Configuration for PostgreSQL DB Server Use Para-Virtualized drivers/adapters wherever possible For example on VMware ESX use PVSCSI for SCSI disks controllers VMXNET3 for Network interface controllers Use Hardware Assisted Virtualization technologies Intel VT or AMD-V Intel EPT or AMD RVI Using these PV adapters and hardware assistance features help to reduce the CPU utilization on the physical server

Selecting VM Configuration for PostgreSQL DB Server

Selecting VM Configuration for PostgreSQL DB Server To maintain minimum SLA use Reservations of resources VMware ESX: CPU is reserved in terms of clock speed and Memory in terms of MB

Know Your WAL Sync Virtualization can lie about Postgres WAL sync For Data Integrity Check with Vendor regarding your specific product. WAL sync does go to the underlying disk on VMware ESX. On Host OS based products it may not be true (People who use fsync=off can skip this slide)

Know Your Disks Thin provisioning is popular Saves money, over provisioning A new write by VM on thin provisioned disks does Block allocation (thick allocation) on underlying storage Zero'ed out (cleaned and secured) So new writes can be expensive for PostgreSQL WAL segments Prepare the blocks in advance: (On VMware ESX use EagerZeroedThick allocations using command line not available directly via vsphere Client) Warm up PostgreSQL servers to create those extra WAL segments before you start measuring performance

Know Your IO Misaligned filesystems with underlying storage block size is a challenge to get it right E.g. fdisk partitions may not align Virtualization makes that more difficult since it adds another layer in between filesystem and physical storage Easy way around is to use entire disks for partitions Monitor Storage IO latencies and keep track of it Use Paravirtualized adapters and drivers (e.g. Vmware PVSCSI)

Know Your vmemory Each VM has an overhead memory on hypervisor The bigger the configuration, the more the overhead increases However, the relative % overhead decreases with increase in VM Memory size Virtual Environments often overcommit memory VMware ESX uses Page Sharing, Ballooning, Swapping, Memory Compression Impacts PostgreSQL bufferpool performance

Know Your vmemory NUMA Groups also affect Memory Latency. VM does not necessary know about NUMA Groups and may not optimize for it (especially for large VMs) VMware ESX does allocation based on NUMA groups for VMs Impacts reads from bufferpool latency Memory can also be reserved by VM, (useful for minimum guarantees)

Know Your vcpu Guest OS in VM often tells you about physical CPU and clock speed Actual frequency may be different Impacts SQL queries (CPU costs are higher) Add variable to your performance expectation equation Hyperthreading (CPU costs are higher) CPU utilization reported by Guest OS does not include CPU overhead related to VM on physical hosts Check Host CPU utilization for actual CPU usage by VM (e.g. VMware esxtop) Make sure Hardware Assisted CPU, MMU virtualization are being used

Know Your SMP vcpus in VM Using SMP vcpu in a VM even when not needed/ used causes overhead for hypervisor (specially for Legacy OS) Has to handle timer interrupts Maintain consistent memory view among multiple vcpu resources Some Guest OS run idle threads on unused cpu power Guest OS moves single threaded among the available vcpu thereby losing local cache locality VMware ESX generally uses paravirtualized tools to overcome these issues

Know Your Network Monitor network latencies Virtual NICs typically connect to virtual switches which connect to physical NICs Network Latencies between VMs go through virtual switches for VMs in same Physical machine During Migrations, that can change and cause increased latencies from clients to machines Use para virtualized adapters and drivers (eg Vmware VMXNET3) Historical data is now your friend to see if things changed

Other Workarounds in Virtualized Environments Time and Tide Waits for No VM Historically VMs are suspended and resumed on the fly by just pausing vcpu causing Real Time and VM time to drift Use either host based NTP or VM based NTP Here Today, Gone Tomorrow Virtual Infrastructure Administrator (or automated policies) can move VM to a physical system which may have slightly different characteristics (E.g. VMware DRS will move the VM with better resources)

PostgreSQL 9.0 Replication under Virtualization Easier to setup by cloning entire VM or clone PGDATA and WAL virtual disks Make sure replications are located on different physical hosts to avoid single point of failure (Hint: Use VM resource policy settings to set them on different servers) Make sure the virtual disks from both VM are also on separate underlying storage system Use NTP to limit Time Drifts Easier to test on virtualization Clone Standby server

Setup Guidelines Summary for Postgres Select VM resources to fit within NUMA Groups Right size vcpu (depending on hyperthreading) Separate PGDATA, WAL in separate file system even if they are on same physical infrastructure Use fully allocated Disks

Monitoring Guidelines for Postgres Make sure the VM resources are not heavily overcommitted Always check for swapping activities even when you don't expect it Depending on your virtualization product, stolen memory may result in swapping Trust VM statistics: Verify with Host Statistics (For VMWare ESX, esxtop is a great tool)

Questions / More Information Email: dfetter@vmware.com Learn more about VMware vsphere Hypervisor http://www.vmware.com/products/vspherehypervisor/