Banco de Dados – Planejando um ambiente SQL Server de alta performance e missão crítica Vitor Fava Data Platform MVP.

Slides:



Advertisements
Similar presentations
Microsoft Virtual Server 2005 Product Overview Mikael Nyström – TrueSec AB MVP Windows Server – Setup/Deployment Mikael Nyström – TrueSec AB MVP Windows.
Advertisements

Chapter 7: Configuring Disks. 2/24 Objectives Learn about disk and file system configuration in Vista Learn how to manage storage Learn about the additional.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 2: Managing Hardware Devices.
Virtual Network Servers. What is a Server? 1. A software application that provides a specific one or more services to other computers  Example: Apache.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Presented by Jacob Wilson SharePoint Practice Lead Bross Group 1.
VMware vCenter Server Module 4.
Secondary Storage Unit 013: Systems Architecture Workbook: Secondary Storage 1G.
Slide 1 Windows PC Accelerators Reporter :吳柏良. Slide 2 Outline l Introduction l Windows SuperFetch l Windows ReadyBoost l Windows ReadyDrive l Conclusion.
Exam QUESTION CertKiller.com has hired you as a database administrator for their network. Your duties include administering the SQL Server 2008.
WINDOWS XP PROFESSIONAL Bilal Munir Mughal Chapter-1 1.

Key Perf considerations & bottlenecks Windows Azure VM characteristics Monitoring TroubleshootingBest practices.
11 SYSTEM PERFORMANCE IN WINDOWS XP Chapter 12. Chapter 12: System Performance in Windows XP2 SYSTEM PERFORMANCE IN WINDOWS XP  Optimize Microsoft Windows.
Designing and Deploying a Scalable EPM Solution Ken Toole Platform Test Manager MS Project Microsoft.
VMware vSphere Configuration and Management v6
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
1© Copyright 2012 EMC Corporation. All rights reserved. EMC VNX5700, EMC FAST Cache, SQL Server AlwaysOn Availability Groups Strategic Solutions Engineering.
MISSION CRITICAL COMPUTING SQL Server Special Considerations.
Jérôme Jaussaud, Senior Product Manager
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Course 03 Basic Concepts assist. eng. Jánó Rajmond, PhD
Get the Most out of SQL Server Standard Edition Or How to be a SQL Miser.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Managing a database environment in the cloud
Chapter 6: Securing the Cloud
Get the Most out of SQL Server Standard Edition
Chapter 2.
Chapter 2: Computer-System Structures
SharePoint Solutions Architect, Protiviti
Lecture 16: Data Storage Wednesday, November 6, 2006.
Andy Wang COP 5611 Advanced Operating Systems
SQL Server Internals Overview
MCTS Guide to Microsoft Windows 7
Chapter 1: Introduction
Course Introduction Dr. Eggen COP 6611 Advanced Operating Systems
Andy Wang COP 5611 Advanced Operating Systems
Cluster Disks and Cluster File Storage
Scaling In e Scaling Out através do elastic pool
Windows Server* 2016 & Intel® Technologies
SQL Server Monitoring Overview
Windows Azure Migrating SQL Server Workloads
Installation and database instance essentials
Azure SQL Database – Scaling in and Scaling out with elastic pool
Introduction to Computers
Memory chips Memory chips have two main properties that determine their application, storage capacity (size) and access time(speed). A memory chip contains.
Chapter Overview Understanding the Database Architecture
Software Architecture in Practice
Introduction of Week 6 Assignment Discussion
Introduction of Week 3 Assignment Discussion
Lecture 11: DMBS Internals
Upgrading to Microsoft SQL Server 2014
Azure SQL Database – Scaling in and Scaling out with elastic pool
What is the Azure SQL Datawarehouse?
Objective Understand the concepts of modern operating systems by investigating the most popular operating system in the current and future market Provide.
Building a Database on S3
HC Hyper-V Module GUI Portal VPS Templates Web Console
KISS-Tree: Smart Latch-Free In-Memory Indexing on Modern Architectures
Building continuously available systems with Hyper-V
Stretch Database - Historical data storage in SQL Server 2016
Andy Wang COP 5611 Advanced Operating Systems
Specialized Cloud Architectures
Chapter 2: Operating-System Structures
Andy Wang COP 5611 Advanced Operating Systems
Database System Architectures
Chapter 2: Operating-System Structures
Objective Understand the concepts of modern operating systems by investigating the most popular operating system in the current and future market Provide.
Andy Wang COP 5611 Advanced Operating Systems
Hybrid Buffer Pool The Good, the Bad and the Ugly
Presentation transcript:

Banco de Dados – Planejando um ambiente SQL Server de alta performance e missão crítica Vitor Fava Data Platform MVP

Agenda Introduction The Life Cycle of a Query Memory (Physical/Virtual) CPU Architecture Storage SQL Server File Layout

Vitor Fava MVP Data Platform Pass Chapter Leader do SQLManiacs Module 0: Introduction Course ####y Vitor Fava MVP Data Platform Pass Chapter Leader do SQLManiacs SQL Server Database Consultant na Pythian CEO da Vita Database Solutions vitortff@gmail.com http://vfava.worpress.com http://www.youtube.com/vitortff https://groups.google.com/group/sqlmaniacs Welcome students to the course and introduce yourself. Provide a brief overview of your background to establish credibility. Ask students to introduce themselves and provide their backgrounds, product experience, and expectations of the course. Record student expectations on a whiteboard or flip chart that you can reference during class.

Introduction Memory, disk, and CPU are the holy trinity of resources in a Computer system, and memory is first because it’s the area you’re most likely to have an issue with; Memory issues can cause both disk and CPU saturation; Storage systems have been confounding database administrators and designers since Microsoft first released SQL Server; Today DBAs are not only required to design and maintain SQL Server, but are also often pressed into service as storage administrators; For DBAs working in the enterprise, communication with the server, networking, and especially storage teams are always a challenge;

The Life Cycle of a Query

Physical Memory When the term physical memory is used, it’s usually in relation to RAM (random access memory), but it actually also includes the system page file; It is regarded as the fastest type of storage you can use, but it’s volatile, meaning you lose what was stored when you reboot the computer; RAM modules is measured in gigabytes per second (GB/s) with nanosecond (ns) response times, whereas hard disk throughput is measured in megabytes per second (MB/s) with millisecond (ms) response times; It’s also expensive and limited in capacity compared to nonvolatile storage such as a hard disk;

Maximum Supported Physical Memory Feature Enterprise Standard Express (Advanced Services) Express Database Engine Windows Maximum 128 GB 1 GB Analysis Services Tabular: 16 GB MOLAP: 64 GB N/A Reporting Services 64 GB 4 GB

Virtual Memory If all the processes running on a computer could only use addresses in physical RAM, the system would very quickly experience a bottleneck. Windows assigns a virtual address space (VAS) to each process. This provides a layer of abstraction between an application and physical memory so that the operating system can choose the most efficient way to use physical memory across all the processes; For example, two different processes can both use the memory address 0xFFF because it’s a virtual address and each process has its own VAS with the same address range. The size of the virtual address space is determined largely by the CPU architecture.

Virtual Memory – x86 The virtual address space for a 32-bit system is only 4GB; Broken down into 2GB for kernel mode and 2GB for user mode;

Virtual Memory – x64 A 64-bit CPU running 64-bit software architecture can manipulate values that are up to 64 bits in length; Value between 0 and 18,446,744,073,709,551,616 to reference a memory address; 44-bit address bus provides a virtual address space on 64-bit systems of 16TB;

Virtual Memory Manager

Sizing the Page File Windows will manage the size of your page file recommending a page file size of 1.5 times the size of RAM; The primary purpose of a page file is to allow Windows to temporarily move data from RAM to disk to help it manage resources effectively; When a page file is heavily used, it indicates memory pressure; and the solution is to optimize your memory resources or buy more RAM, rather than to optimize your page file; If you have disk space concerns on your page file drive, then setting the page file to 50% of total available RAM;

SMP Traditional architecture, every processor has access to every memory bank across a shared system bus to a central memory controller on the motherboard (SMP);

SMP

Non-Uniform Memory Architecture - NUMA Non-Uniform Memory Architecture (NUMA) is a hardware design that improves server scalability by removing motherboard bottlenecks;

Non-Uniform Memory Architecture - NUMA

NUMA – SQL Server’s Use of NUMA SQL Server creates its own internal nodes on startup that map directly on to NUMA nodes;

SQL Server NUMA Memory Configuration

Non-Uniform Memory Architecture - NUMA

Min and Max Server Memory Min Server Memory (MB) and Max Server Memory (MB) control the allowable size of all SQL Server’s memory usage; Look at SQL Server’s maximum usage; MSSQL$<instance>:Memory Manager\Total Server Memory (KB); Determine the maximum potential for memory requirements outside SQL Server; 2GB for Windows; xGB for SQL Server worker threads; 512MB, if you use linked servers, extended stored procedure dlls, or objects created using Automation procedures (sp_OA calls); 1–3GB, for other applications that might be running on the system, such as backup programs or anti-virus software;

Lock Pages in Memory Lock Pages in Memory (LPIM) is used as a work-around for a problem than can occur between Windows and SQL Server; It was especially bad on older versions of SQL Server, which could run on Windows Server 2003 and earlier; This is known as aggressive working set trimming and had a devastating effect on SQL Server’s memory allocation — and therefore performance First set Max Server Memory appropriately; SQL Server’s buffer pool pages are “locked” and non-pageable so Windows can’t take them when trimming; SQL Server Error Log: Using Locked Pages in the Memory Manager;

Optimize for Ad-Hoc Workloads When this option is enabled, SQL Server will cache only a plan stub the first time a piece of ad-hoc T-SQL is executed, rather than the full plan; If SQL Server subsequently tries to reuse that plan, it will be generated again but this time cached in full; This avoids the scenario of thousands of single-use plans taking up valuable space in cache;

The Fundamental Characteristics of Storage

The Fundamental Characteristics of Storage Latency; IOPS; Bandwidth; These three measurements are all related, so you can’t just look at one of them in isolation, without knowing the others; Storage vendors tend to show their best -case numbers in isolation;

Storage Technology Storage array controllers group disks into volumes called a redundant array of inexpensive disks (RAID); RAID-constructed volumes offer capacity without failure protection; RAID 0; RAID 1; RAID 5; RAID 1+0;

Storage Technology

Storage Tiering

Storage Performance Counters Latency Average Disk sec/Read Average Disk sec/Write IOPS Disk Reads/sec Disk Writes/sec Bandwidth Disk Read Bytes/Sec Disk Write Bytes/Sec

SQL Server – File Layout 10,000 transactions and 10K SAS drives; About 140 IOPS, therefore, you need 142 of them; Design tempdb to be about 20 percent of the expected I/O for the main data files, so you expect 2,000 IOPS; SATA drives perform sequential operations extremely well, so they are a great candidate for dump drives (RAID 6); You should completely isolate the log onto its own set of RAID 1+0 SAS disk drives;

SQL Server – File Layout Microsoft recommends the use of a 64KB allocation unit size for data, logs, and tempdb; When using SQL Server FILESTREAM to store unstructured data, ensure that the partition used to host FILESTREAM data is formatted with an appropriate sector size, usually 4KB; SQL Server Analysis Services (SSAS) will read and write cube data to small XML files and should therefore also utilize a 32KB-sector size;

SQL Server – Disk Layout

Disk Benchmark Tools CrystalDiskMark (http://bit.ly/1vm5dPe) SQLIO (http://bit.ly/1obVdIV) DiskSpd (http://bit.ly/1whNzQL)

Referências SQL Server Internal 2012 - Internals & Troubleshooting Microsoft Windows Clustering: Storage Area Networks http://www.microsoft.com/windowsserver2003/techinfo/overview/san.mspx StorPort in Windows Server 2003: Improving Manageability and Performance in Hardware RAID and Storage Area Networks http://www.microsoft.com/windowsserversystem/wss2003/techinfo/plandeploy/storportwp.mspx Virtual Device Interface Specification http://www.microsoft.com/downloads/details.aspx?FamilyID=416f8a51-65a3-4e8e-a4c8-adfe15e850fc&DisplayLang=en Windows Server System Storage Home http://www.microsoft.com/windowsserversystem/storage/default.mspx Microsoft Storage Technologies – Multipath I/O http://www.microsoft.com/windowsserversystem/storage/technologies/mpio/default.mspx Storage Top 10 Best Practices http://sqlcat.com/top10lists/archive/2007/11/21/storage-top-10-best-practices.aspx