Hardware Performance Optimization and Tuning Presenter: Tom Arakelian Assistant: Guy Ingalls
Agenda Server Performance Server Reliability Why we need Performance Monitoring How to optimize server performance Server Hardware component classifications How to read performance counter data 2
Server Performance In General terms, performance is the measure of how quickly a computer completes applications and system tasks. Overall system performance might be limited by the access speed of the following components: Physical hard disks Amount of memory available to all running processes Top speed of the processor Maximum throughput of the Network Interfaces (NIC) 3
Server Reliability The reliability of a system is the measure of how often the system operates as it is configured and expected to perform. Reliability can be reduced when: Applications stop responding Services stop and restart Drivers fail to load and initialize Or in worst case Operating System FAILS!!! 4
Reason for Performance Monitoring Detecting network bottlenecks. Troubleshooting latency frustrations. Identifying server performance problems. Uncovering intermittent faults. Planning the capacity of your servers and subnets. Setting alerts so that you can nip trouble in the bud. Creating baselines when activity is low. Understanding the effect of your workload on resources 5
Reliability & Performance Monitor Windows Server 2008 includes Windows Reliability and performance monitor which is a Microsoft Management Console (MMC) snap-in which combines the functionality of: Performance Logs and Alerts Server performance Advisor System Monitor Reliability Monitor 6
Reliability Monitor Reliability Monitor calculates a System Stability Index Reliability monitor provides you with quick, visual view of the average stability of your system. The accompanying System Stability Report provides details to help troubleshoot the root cause of reduced reliability. 7
Optimizing Your Servers Choosing Hard drives: Use SSD, SAS15K/10K hard drives vs. SATA7200RPM Choose a RAID Controller that will support more than RAID1. Choose Hot Swap Hard Disks Configure RAID properly Use separate logical nodes for OS, DATA, LOG and TempDB Run Disk Defragmentation weekly 8
Optimizing Your Servers (cont d) Suggested Max Memory Settings for SQL Server 2005/2008 These settings are for x64, on a dedicated database server, only running the DB engine, (which is the ideal situation). RAM Max Mem 2GB 1.5 GB 4GB 3.2 GB 6GB 4.8 GB 8GB 6.4 GB 12GB 10 Gb 16GB 13 GB 24GB 22 GB 32GB 28 GB 48GB 44 GB 64GB 60 GB 72GB 68 GB 96GB 92 GB 128GB 124 GB 9
Optimizing Your Servers (cont d) AWE Switch Explained: Address Windowing Extensions API is commonly known as AWE. AWE is used by SQL Server when it has to support very large amounts of physical memory. AWE feature is only available in SQL Server Enterprise, Standard, and Developer editions of SQL Server 32 bit version. Windows 2008R2 or 64bit versions of the OS do not need AWE enabled. 10
Performance Monitor Counters It s always recommended to monitor the following four objects together. Individual monitoring can lead to false diagnosis of the cause of poor performance. 1. Processor Performance Counters - Associated with performance objects. 2. Memory Performance Counters Associated with memory objects. 3. Disk Performance Counters Associated with Physical Disk and Logical Disk objects. 4. Network Performance Counters Associated with the network interface, network segment and TCP/IP components 11
Processor Performance Counters Processor: % Processor Time The rule of thumb is that the threshold for a Processor % bottlenecks is above 70% System: Processor Queue The rule of thumb is that the threshold for a queue bottlenecks is 2 With multiple processors, it is reasonable to divide the System: Processor queue by the number of processors. So a twin processor could sustain a queue of 4. 12
Processor Classifications Letter Prefix: X = Performance E = Mainstream (rack mount) W= Workstation up to 2 processors per mother board 13
Memory Counters Page File: % Usage Over 70% usage is indicator for bottleneck Move page file away from OS Partition Page file twice the size of total RAM is good rule of thumb Always buy machines with more RAM than you need now. 14
Network Counters Bytes Total/sec Bytes Sent/sec Bytes Received/sec Current Bandwidth If network utilization is greater than 40% this is a good indication that you are experiencing a bottleneck on your NIC. Solutions to Network Problems Add another network card. Segmentation - change your subnet mask, add routers. Switches - install a packet switch 15
Designing SQL Server What not to do. No DIY Route Buying Disk Size not Disk Performance Choosing the Wrong RAID Option Buying too few Drives Blindly trusting the SAN Going 32 Bit 16
Sample Performance Data 17
Summary Monitor Servers regularly for any performance issues Configure your server for optimum performance Design your server specifications to match your business needs Leave room for future hardware expansion and upgrade Purchase name brand equipment (Dell, HP, IBM) Recommended to purchase more than you need rather than upgrade later. 18
19