Lectura 5 - Avoiding Common SQL Server Performance Problems
Lectura 5 - Avoiding Common SQL Server Performance Problems
Performance Problems
By: Michael Otey
Link: https://logicalread.com/avoiding-common-sql-server-performance-
problems/#.XYO4FChKjIU
A lot of different factors go into SQL Server® performance, which can make
troubleshooting performance problems difficult. However, there are many
common SQL Server deployment mistakes that can impact SQL Server
performance. In this presentation, you’ll learn about some of the common
mistakes that can degrade SQL Server performance and how to avoid them.
You’ll also see how SolarWinds® Database Performance Analyzer can help you
quickly identify CPU, memory, and storage issues.
Performance is always one of the DBA’s top priorities, and there’s one thing
every DBA knows about SQL Server® performance: if there’s a problem you’re
going to hear about it. It’s far better to be proactive and stay in top of your
system’s performance than it is to be reactive when it comes to addressing user
complaints. However, SQL Server is a complex system and getting to the root
of performance problems can be difficult. There are a lot of different factors that
can impact SQL Server performance, ranging from hardware and system
configuration settings to poor T-SQL query practices. In this article, I’ll cover
some of the most common causes of SQL Server performance problems and
some of the best practices to avoid them.
Storage also plays a vital role in SQL Server performance, and for many
systems today, storage has become the main system bottleneck. Many of
today’s tier one server systems have multi-core processors and support very
large amounts of memory. Some of the enterprise server platforms support
more than 200 cores up to 48TBs of RAM. Connecting these high-powered
servers to an older storage subsystem often means the storage can’t keep up
with the rest of the system. Some important performance counters for
monitoring your storage include:
The SQL Server database storage configuration can also play a big part in
performance. By default, the SQL Server installation program puts both the data
and log files on the system drive. Typically, they are stored in a location like
C:\Program Files\Microsoft SQL
Server\MSSQL13.MSSQLSERVER\MSSQL\DATA. This is not the best
configuration and it will quickly cause I/O contention in all but the most modest
workloads. Data files tend to support more read operations with more random
access, while transaction logs have a high level of sequential write access. For
SANs and HDD storage, a best practice is to move the data and log files onto
separate physical drive arrays. If you are using flash storage or SSDs, it might
be possible to have both on the same drive, but you need to be sure your Disk
Sec/Reads and Write are around 1-2 ms.
By default, the Windows power plan setting is set to Balanced. To make sure
your system is delivering all of the performance it’s capable of, you should
change this setting to High performance.
SQL Server TEMPDB and Server
Configuration Settings
SQL Server configuration settings can also have a big impact on performance.
In the default configuration, several of these settings will result in less than
optimum performance. While there are a lot of configuration settings that can
influence performance, some of the primary SQL Server default configuration
settings that should be considered include:
Following some of these best practices for system configuration and setup can
help you avoid some of the most common SQL Server performance problems.