SQL Performance Meditation: Duration and CPU Reveal a Profound Truth

Have you wondered if there is a simple way to find out if a query is slowed down by bottlenecks? Looking at the Duration (Elapsed Time) and CPU (Worker Time) reported by a completed query can reveal the answer. See, Duration/Elapsed Time indicates the overall lifetime of a query, while CPU shows only the time…

0

Meditation: The Tao of the Deadlock Scheduler in SQL Server

Just thought I would summarize the concept of a SOS Scheduler and a Deadlocked Scheduler since many have inquired over the years for a brief summary of these concepts   UMS/SOS Scheduler in SQL  Server Since SQL Server 7.0, SQL  Server has used its own scheduling mechanism, called UMS (User-mode scheduler)  in 7.0 and 2000 and…

1

Tasks, Workers, Threads, Scheduler, Sessions, Connections, Requests – what does it all mean?

With this meditation I attempt to explain what some of the more common concepts that get used with SQL Server thread management and scheduling are. Parable: There was an all-powerful, but humble and benign Master, whom the workers revered and humbly served. The master accepted requests from other kingdoms and graciously agreed to grant all…

5

Meditation: Is IOCP listener actually listening?

What is the IOCP Listener? The IOCP listener is a dedicated system thread that accepts incoming connections to SQL Server. It is a SQL Network Interface (SNI)-layer thread that listens for TCP/IP sockets or Named Pipes traffic (VIA is going away but still in the code). When a connection comes in, the listener accepts it…

0

Meditation on Locked Pages in Memory and User Rights

A colleague had the following question not too long ago Question: Does SQL Server check for “OS permissions” such as Locked Pages In Memory (LPIM) and if so does it use the Windows “macro-style” constants for them – such as SE_VOLUME_MANAGE? The reason I ask is that I’m still wanting to determine “major things” that…

0

Meditation on SQL Trace performance Impact and Wait types

  Is SQL Trace,  or SQL Profiler,  or any other 3rd party tracing tool impacting SQL Server performance? The DBAs often contemplate this issue when they want to get insight from their SQL Server. Essentially the tracing mechanisms in SQL Server will present themselves as a bottlenecks (waits). See, when a SQL worker thread is…

2

SQL RPC vs. Windows RPC

  Question: “If one executes stored procedures using the RPC events mechanism (instead of Language events ), do any additional RPC ports need to be open (as is the case with SSIS )? Configuring the Windows Firewall to Allow SQL Server Access – http://msdn.microsoft.com/en-us/library/cc646023(v=sql.100).aspx   Answer: This confusion is introduced by “name overloading”, i.e “RPC”…

0

"Waits, Waits, Do Tell Me" – how to analyze bottlenecks in SQL Server

“Waits” in SQL Server are often a major source of performance issues. “Waits” as they are known in the SQL Server world essentially indicate that a worker thread inside SQL Server is waiting for a resource to become available before it can proceed with executing. See, a thread is tasked with executing code, it blossoms…

1

Meditation on Slow Inserts in SQL Server

This SQL Meditation contemplates on some common reasons why INSERT statements are taking a long time (slow)     1. Each Insert in a large batch is causing a log flush thus causing waiting   Is each insert a separate transaction or are those grouped in a transaction? If you review KB 230785 you will notice the…

0

Slow I/O Mediation – SQL Server and disk I/O performance

This SQL meditation provides a general approach on how to troubleshoot SQL Server I/O related issues. My belief is that if you truly understand this, you are empowered to solve the disk I/O challenges yourself. I offer to teach you how to fish. What kind of fish you catch, and where you catch it and…

0