Groups | Blog | Home
all groups > sql server connect > july 2004 >

sql server connect : SQL Server 2000 periodically running slowly



Gary Broughton
7/19/2004 4:33:25 AM
Hi all

We are having intermittent problems with SQL Server 2000
SP3 on a Windows 2000 SP4 server. A couple of times a
day the CPU will rise to at least 70% usage and all
connections to it will become REALLY slow i.e. three or
four minutes apiece.

We've run the Profiler several times. Most of the time
it looks okay, though occasionally some of
the "exec_cursorfetch" and "exec_cursorclose" are taking
upwards of 60 seconds (?). There are also
frequent "Audit Logins/Logouts" though I assume this is
normal.

It's been running fine for two or three years and started
playing up two weeks ago. Last weekend we re-installed
on a new server, re-applying the latest service packs,
but to no avail.

The network traffic doesn't seem to alter too much
either. Can anyone offer any advice on what could cause
this, or suggestions on things we could look out for?

Incidentally, stopping and restarting the SQL service has
stopped the problem on all but one occasion.

Many thanks
Gary Broughton
7/19/2004 6:17:13 AM
Hi Andrew

Many thanks for your reply. I've looked at one or two of
those links, but will be sure to browse through the
remainder immediately.

Task Manager does indeed usually report that
the "Available Phyical Memory (K)" is down to its last
10,000 (of 1GB), though it's around that figure now and
working fine.

I ran a trace for 30 minutes and then the "Index Tuning"
on it, and that couldn't suggest any index changes, which
I thought probably suggested the statements were in
order. Is that a reliable tool?

Definitely odd and very frustrating.

Thank you very much for the info
Gary

[quoted text, click to view]
Andrew J. Kelly
7/19/2004 8:49:56 AM
Gary,

You should also monitor perfmon to see what resources are bottlenecking when
this happens but I suspect you are running low on memory and may be swapping
to disk at the OS level. These links should help:


http://www.microsoft.com/sql/techinfo/administration/2000/perftuning.asp
Performance WP's
http://www.swynk.com/friends/vandenberg/perfmonitor.asp Perfmon counters
http://www.sql-server-performance.com/sql_server_performance_audit.asp
Hardware Performance CheckList
http://www.sql-server-performance.com/best_sql_server_performance_tips.asp
SQL 2000 Performance tuning tips
http://www.support.microsoft.com/?id=q224587 Troubleshooting App
Performance
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_perfmon_24u1.asp
Disk Monitoring


The cursor calls indicate your client is not optimized and may be doing a
row by row fetch which can definitely lead to performance issues. It should
return only the rows it needs and all at once, not one at a time with a
cursor.

--
Andrew J. Kelly SQL MVP


[quoted text, click to view]

Andrew J. Kelly
7/19/2004 4:12:13 PM
Personally I wouldn't trust the fact that the ITW did not make any
recommendations to say that everything is fine in that area. Profiler and
perfmon will give a better indication as to how efficient your queries are
especially the Reads and CPU columns of profiler. Do you have other apps
running on the server other than SQL Server? If so you may want to limit the
amount of memory SQL Server can use by setting the MAX memory setting down
fromt he default to avoid a bunch of allocation and reallocation of memory
between the OS and SQL.

--
Andrew J. Kelly SQL MVP


[quoted text, click to view]

AddThis Social Bookmark Button