473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

slow DNS caused extreme SQLS memory pressure+CPU?

aj
Microsoft SQL Server 2005 - 9.00.3054.00 (X64)
(Build 3790: Service Pack 2)

Last Friday we had a situation where the DNS system inside
our Active Directory server went weird. I know this isn't
a DNS or AD NG, but please bear with me...

The DNS server didn't really stop working - it was just taking
a looooooonnnggggg time to service requests. During this, the SQL
server (SQLS) engine had lots of (mostly jdbc) connections to web
servers, java apps, etc...

This DNS problem made SQL Server really upset. The CPU on the SQLS
box shot up to above 85% and stayed there. It was so jammed I could
not connect to the DB inside Mgmt Studio, or on the cmd-line. I even
tried DAC, with no response there either. The sqlserver.exe process
was taking all the CPU.

I tried to shut down the SQLS service in Control Panel. It said the
service was stopping....and it stayed like that for 20 minutes....all
with the CPU at 80% or so...

During this time, I got a bunch of really nasty looking OBJECTSTORE,
USERSTORE, CACHESTORE, and MEMORYCLERK errors I also saw LazyWriter: no
free buffers found and complaints about memory pressure. All of this
continued even after the DNS issue was fixed. I finally had to reboot
the server, and it went thru crash recovery. Its been fine since.

My question: how would you expect SQLS to respond if DNS suddenly
became unresponsive? Does it make sense that the CPU would shoot up
like that? Is something not configured properly? Why would
suddenly unresponsive DNS cause memory pressure?

Any thoughts appreciated..

aj
Nov 17 '08 #1
4 2881
aj
btw - just so folks on the NG knows I'm not a complete idiot:

It looks very likely that I simply have a problem w/ not enough
RAM in my 64-bit SQL Server box. Our propensity for
non-parameterized ad-hoc sql, and other factors, is likely
causing plan cache bloat and general memory pressure. I think
this caused the CPU spike, and MS support is now involved.

The DNS problem occurring at almost the same time is simply
a coincidence, albeit a very, very odd one. I'm a freshly minted
SQL Server dba (lots of experience on *nix and other databases), so
some of this Windows server stuff is quite new..

Anyone have any advice about memory pressure issues on 64-bit SQL
Server, which seems to be a common thing?

thanks

cheers
aj

aj wrote:
Microsoft SQL Server 2005 - 9.00.3054.00 (X64)
(Build 3790: Service Pack 2)

Last Friday we had a situation where the DNS system inside
our Active Directory server went weird. I know this isn't
a DNS or AD NG, but please bear with me...

The DNS server didn't really stop working - it was just taking
a looooooonnnggggg time to service requests. During this, the SQL
server (SQLS) engine had lots of (mostly jdbc) connections to web
servers, java apps, etc...

This DNS problem made SQL Server really upset. The CPU on the SQLS
box shot up to above 85% and stayed there. It was so jammed I could
not connect to the DB inside Mgmt Studio, or on the cmd-line. I even
tried DAC, with no response there either. The sqlserver.exe process
was taking all the CPU.

I tried to shut down the SQLS service in Control Panel. It said the
service was stopping....and it stayed like that for 20 minutes....all
with the CPU at 80% or so...

During this time, I got a bunch of really nasty looking OBJECTSTORE,
USERSTORE, CACHESTORE, and MEMORYCLERK errors I also saw LazyWriter: no
free buffers found and complaints about memory pressure. All of this
continued even after the DNS issue was fixed. I finally had to reboot
the server, and it went thru crash recovery. Its been fine since.

My question: how would you expect SQLS to respond if DNS suddenly
became unresponsive? Does it make sense that the CPU would shoot up
like that? Is something not configured properly? Why would
suddenly unresponsive DNS cause memory pressure?

Any thoughts appreciated..

aj

Nov 19 '08 #2
aj (ro****@mcdonalds.com) writes:
btw - just so folks on the NG knows I'm not a complete idiot:

It looks very likely that I simply have a problem w/ not enough
RAM in my 64-bit SQL Server box. Our propensity for
non-parameterized ad-hoc sql, and other factors, is likely
causing plan cache bloat and general memory pressure. I think
this caused the CPU spike, and MS support is now involved.

The DNS problem occurring at almost the same time is simply
a coincidence, albeit a very, very odd one. I'm a freshly minted
SQL Server dba (lots of experience on *nix and other databases), so
some of this Windows server stuff is quite new..

Anyone have any advice about memory pressure issues on 64-bit SQL
Server, which seems to be a common thing?
Actually, from what I have heard, the cachebloat thing more often happens
when you have lots of RAM. With a small amount of RAM, plans get aged out
the cache quickly. With a huge amount, they linger longer, and you can
get hash collisions.

If you have a lot of non-parameterised ad hoc-sql, ALTER DATABASE SET
PARAMETERIZATION FORCED can help. You will have to pray that you don't
become a victim of SQL injection, though.

There are also some issues with temp-table caching, and there are
some hotfixes that addresses these problems, and I guess MS will recommend
you to apply any of these.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Nov 19 '08 #3
aj
Thanks Erland.

We are installing 32 gigs of RAM on the server this weekend.
Is it generally recommended to set the maximum server memory (on
the Server Properties->Memory page) to something less than 32 gigs,
or leave it at the absurdly high default setting? (which I think
is like 2 petabytes)

So with ALTER DATABASE SET PARAMETERIZATION FORCED turned on,
the engine will take non-parameterized sql and parameterize
it? So that you don't get a bunch of similar master..syscacheobjects
rows w/ a USECOUNTS of 1?

aj

Erland Sommarskog wrote:
aj (ro****@mcdonalds.com) writes:
>btw - just so folks on the NG knows I'm not a complete idiot:

It looks very likely that I simply have a problem w/ not enough
RAM in my 64-bit SQL Server box. Our propensity for
non-parameterized ad-hoc sql, and other factors, is likely
causing plan cache bloat and general memory pressure. I think
this caused the CPU spike, and MS support is now involved.

The DNS problem occurring at almost the same time is simply
a coincidence, albeit a very, very odd one. I'm a freshly minted
SQL Server dba (lots of experience on *nix and other databases), so
some of this Windows server stuff is quite new..

Anyone have any advice about memory pressure issues on 64-bit SQL
Server, which seems to be a common thing?

Actually, from what I have heard, the cachebloat thing more often happens
when you have lots of RAM. With a small amount of RAM, plans get aged out
the cache quickly. With a huge amount, they linger longer, and you can
get hash collisions.

If you have a lot of non-parameterised ad hoc-sql, ALTER DATABASE SET
PARAMETERIZATION FORCED can help. You will have to pray that you don't
become a victim of SQL injection, though.

There are also some issues with temp-table caching, and there are
some hotfixes that addresses these problems, and I guess MS will recommend
you to apply any of these.
Nov 19 '08 #4
aj (ro****@mcdonalds.com) writes:
We are installing 32 gigs of RAM on the server this weekend.
Is it generally recommended to set the maximum server memory (on
the Server Properties->Memory page) to something less than 32 gigs,
or leave it at the absurdly high default setting? (which I think
is like 2 petabytes)
I tend to prefer to always cap the memory, because I've seen some
funky behaviour. 28 GB sounds good in this case. But if you later
add more memory, and forget to update the settingm you lose.
So with ALTER DATABASE SET PARAMETERIZATION FORCED turned on,
the engine will take non-parameterized sql and parameterize
it? So that you don't get a bunch of similar master..syscacheobjects
rows w/ a USECOUNTS of 1?
They still cache a shell query for some reason, so you will still see
these USECOUNT = 1.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Nov 20 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Henry | last post by:
I know some of you have seen this problem. Stepping through code in the debugger is slow as heck in Visual Studio 2005. Well here is the problem, Edit and continue. Because edit and continue does...
1
by: Gaël | last post by:
Hi everybody! I have a really big problem with ASP.NET application. I noticed that the w3wp.exe memory size, increase with the time and the use of my website. When it raise a certain value, w3wp...
14
by: Andrew Bullock | last post by:
Hi, I had this problem before I reinstalled Windows XP SP2 (fully patched), but I cant remember what I had to do to fix it :( I have a loop which scans every pixel in a series of images. When...
14
by: Michel Esber | last post by:
Linux RH 4.0 running DB2 V8 FP 11. I have a table with ~ 11M rows and running DELETE statements is really slow. Deleting 1k rows takes more than 3 minutes. If I run select statements on the same...
0
by: CptDondo | last post by:
I have a website that is generated on the fly from XML templates. I've been having some performance issues (pages taking 6 seconds or more to be generated) and profiled the php code. (This is an...
5
by: Jason | last post by:
Hello, I am testing a complex J2EE application on WebSphere and UDB V8.2.3. Because of the compliexity of the application, we have to run it a few hours to finish all test scenarios. One of...
9
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Today, an interesting thing happened to me. When I am doing the test of an asp program, one of the pages(which I submitted several ten times before, no problem at all) caused our server...
66
by: karthikbalaguru | last post by:
Hi, Will 'free' return the memory Immediately to the OS ? Thx in advans, Karthik Balaguru
7
by: Danny Ni | last post by:
Hi, I inherited a web project from other programmer. I notice on my dev machine every time I request a page in IE or FF the CPU jumps to 100%, all utilized by asp_wp.exe. I did some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.