Excessive Locking

Excessive Locking

Post by Jacob Bola » Thu, 10 May 2001 03:22:22



Hello.  I have an issue with SQL 2000 where when I run profiler I see multiple
locks that are acquired then release many, many times over.  I have an
application with minimal users 15-20 and the clients are accessing a Compaq
Proliant 8000 with dual 800Mhz processors, (6) 18GB drives in a RAID 5 config,
2GB of ram and all connected to a Cisco 3548 Switch via Gigabit link.  I am
seeing poor performance from the database.  I have a feeling it may be due to the
locking issue.  
Running Profiler for 1 hr and filtering it down to 3 users (that do not have a
real heavy load; simple selects, updates, inserts) the Profiler returns over
22000 Lock:Acquired/Released entries!  Is this normal?  The app they are using
isn't too transaction intensive.  Mostly selects.  I was going to attach a
Profiler Trace file, but they are pretty big.  If this would be of help, please
let me know.
Thanks in advance for any help or comments!

Jacob Bolan
Federated Rural Electric Insurance
913-541-0150

 
 
 

Excessive Locking

Post by Mike » Thu, 10 May 2001 05:59:17


Locks are how SQL works.  There are many levels of locks (you didn't mention what instance you were watching) and many types.

While possible, i don't know that I would look at locks first for performance related issues.

A quick check of a Compaq with SQL 7 Enterprise using 3 gig of memory and 4 processors shows a max of 224056 RID lock requests and an average of 15810.  Probably of greater concern would be Lock Waits/sec.  Which would mean a process had to wait for a lock.  I have no instances that show any lock waits/sec.

Hello.  I have an issue with SQL 2000 where when I run profiler I see multiple
locks that are acquired then release many, many times over.  I have an
application with minimal users 15-20 and the clients are accessing a Compaq
Proliant 8000 with dual 800Mhz processors, (6) 18GB drives in a RAID 5 config,
2GB of ram and all connected to a Cisco 3548 Switch via Gigabit link.  I am
seeing poor performance from the database.  I have a feeling it may be due to the
locking issue.  
Running Profiler for 1 hr and filtering it down to 3 users (that do not have a
real heavy load; simple selects, updates, inserts) the Profiler returns over
22000 Lock:Acquired/Released entries!  Is this normal?  The app they are using
isn't too transaction intensive.  Mostly selects.  I was going to attach a
Profiler Trace file, but they are pretty big.  If this would be of help, please
let me know.
Thanks in advance for any help or comments!

Jacob Bolan
Federated Rural Electric Insurance
913-541-0150

 
 
 

Excessive Locking

Post by John Go » Fri, 11 May 2001 03:40:22


Jacob,

As Mike stated locks are an inherent part of how SQL Server does its
business.  And you need to know what types of locks are being
requested/acquired.  One thing to check for are exclusive locks on
resources.  This can lead to blocking which leads to performance problems.  
There is a KB article located at
http://support.microsoft.com/support/kb/articles/q271/5/09.asp that details
how to monitor for blocking.

John Gose
Microsoft SQL Server Support
--------------------



| Subject: Re: Excessive Locking
| Date: Tue, 8 May 2001 15:59:17 -0500
| Lines: 45
||
<Snip of Header Stuff>
|
| Locks are how SQL works.  There are many levels of locks (you didn't
mention what instance you were watching) and many types.
| While possible, i don't know that I would look at locks first for
performance related issues.
| A quick check of a Compaq with SQL 7 Enterprise using 3 gig of memory and
4 processors shows a max of 224056 RID lock requests and an average of
15810.  Probably of greater concern would be Lock Waits/sec.  Which would
mean a process had to wait for a lock.  I have no instances that show any
lock waits/sec.


| Hello.  I have an issue with SQL 2000 where when I run profiler I see
multiple
| locks that are acquired then release many, many times over.  I have an
| application with minimal users 15-20 and the clients are accessing a
Compaq
| Proliant 8000 with dual 800Mhz processors, (6) 18GB drives in a RAID 5
config,
| 2GB of ram and all connected to a Cisco 3548 Switch via Gigabit link.  I
am
| seeing poor performance from the database.  I have a feeling it may be
due to the
| locking issue.  
| Running Profiler for 1 hr and filtering it down to 3 users (that do not
have a
| real heavy load; simple selects, updates, inserts) the Profiler returns
over
| 22000 Lock:Acquired/Released entries!  Is this normal?  The app they are
using
| isn't too transaction intensive.  Mostly selects.  I was going to attach
a
| Profiler Trace file, but they are pretty big.  If this would be of help,
please
| let me know.
| Thanks in advance for any help or comments!
| Jacob Bolan
| Federated Rural Electric Insurance
| 913-541-0150
|

 
 
 

1. xp_get_mapi_profiles excessive locking

I've set up sql server 7 w. sp1 to netsend me when things go wrong. I only
selected netsend from the list of options in operator. I havn't attempted to
set up SQL Mail or SQL Agent Mail on this machine.

For the past couple of days there has been blocking caused by one process
which is causing all other processes to wait. When the problem occurs i did
an sp_who and and sp_lock. With sp_who i identified the process. Matching
the locks in sp_lock shows that the object requesting the lock was
xp_get_mapi_profiles. In the latest crash xp_get_mapi_profiles was
requesting more then 8000 different shared locks on various indexes. Another
process which was created for a different machine running the same
application also had a xp_get_mapi_profiles requesting and getting 8000
shared locks.

On a previous crash another process (running on behalf of a completly
different application then the above) was using xp_get_mapi_profiles, which
has requested and received 1 shared lock on an index.

Currently there is one process that has a lock requested by
xp_get_mapi_profiles. The machine isn't crashig howeever.

I have no idea what this process is, why it requests so many locks, and
can't find any information on it in Books Online or on Microsoft's website.
I believe it's related to my current problems. Anyone have any ideas on
where to find out any info on it or have an idea why it's getting called?

Thanks in advance,
Bob

2. NJ-Middletown-93410--Project Management-Leadership-Client/Server-HTML-MS Office-

3. Excessive Locks

4. Tables and Filegroups

5. excessive waiting

6. Error 429

7. Excessive latching under SQL 7?

8. R:Base anyone?

9. Excessive Log File Growth With Simple Recovery

10. Excessive RPC Network Traffic

11. Performance of SQL 7.0 : Stored procedure involving excessive usage of tempdb

12. Excessive memory usage

13. Excessive Disk Activity