SQL Contadores de Performance
SQL Contadores de Performance
*****
Since the number of users using SQL Server
affects its performance, you may want to keep
an eye on the SQL Server General Statistics
Object: User Connections. This shows the
number of user connections, not the number of
users, that are currently connected to SQL
Server.
When interpreting this number, keep in mind
that a single user can have multiple connections
open, and also that multiple people can share a
single user connection. Don't make the
assumption that this number represents actual
users. Instead, use it as a relative measure of
how "busy" the server is. Watch the number
over time to get a feel if your server is being
used more, or being used less. [6.5, 7.0, 2000]
Updated 6-12-2006
*****
If your databases are suffering from deadlocks,
you can track then by using the SQL Server
Locks Object: Number of Deadlocks/sec. But
unless this number is relatively high, you want
see much here because the measure is by
second, and it takes quite a few deadlocks to be
noticeable.
But still, it is worth checking out if you are
having a deadlock problem. Better yet, use the
Profiler's ability to track deadlocks. It will
provide you with more detailed information.
What you might consider doing is to use the
Number of Deadlocks/sec counter on a regular
basis to get the "big" picture, and if you
discover deadlock problems with this counter,
then use the Profiler to "drill" down on the
problem for a more detailed analysis. [6.5, 7.0,
2000] Updated 6-12-2006
*****
If your users are complaining that they
have to wait for their transactions to
complete, you may want to find out if object
locking on the server is contributing to this
problem. To do this, use the SQL Server Locks
Object: Average Wait Time (ms). You can
*****
If you are using transactional replication,
you may want to monitor the latency that it
takes the Log Reader to move transactions from
a database's transaction log until it moves it to
the distribution database, and also to monitor
the latency it takes the Distributor Agent to
move transactions from the distribution
database to the subscriber database. The total
of these two figures is the amount of time it
takes a transaction to get from the publication
database to the subscriber database.
The counters for these two processes are the:
SQL Server Replication LogReader:
Delivery Latency counter and the SQL Server
Replication Dist.: Delivery Latency counter.
If you see a significant increase in the latency
for either of these processes, this should be a
signal to you to find out what new or different
has happened to cause the increased latency.
[6.5, 7.0, 2000] Updated 6-12-2006
*****
A key counter to watch is the SQL Server Buffer
Manager Object: Buffer Cache Hit Ratio. This
indicates how often SQL Server goes to the
buffer, not the hard disk, to get data. The higher
this ratio, the less often SQL Server has to go to
the hard disk to fetch data, and performance
overall is boosted.
Unlike many of the other counters available for
monitoring SQL Server, this counter averages
the Buffer Cache Hit Ratio from the time the last
instance of SQL Server was restarted. In other
words, this counter is not a real-time
measurement, but an average of all the days
since SQL Server was last restarted. Because of
this, if you really want to get an accurate record
of what is happening in your Buffer Cache right
now, you must stop and restart the SQL Server
service, then letting SQL Server run several
*****
A latch is in essence a "lightweight lock".
From a technical perspective, a latch is a
lightweight, short-term synchronization object
(for those who like technical jargon). A latch
acts like a lock, in that its purpose is to prevent
data from changing unexpectedly. For example,
when a row of data is being moved from the
buffer to the SQL Server storage engine, a latch
is used by SQL Server during this move (which
is very quick indeed) to prevent the data in the
row from being changed during this very short
time period. This not only applies to rows of
data, but to index information as well, as it is
retrieved by SQL Server.
Just like a lock, a latch can prevent SQL Server
from accessing rows in a database, which can
hurt performance. Because of this, you want to
minimize latch time.
SQL Server provides three different ways to
measure latch activity. They include:
--clears stats