SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2008 Memory utilization


SQL Server 2008 Memory utilization

Author
Message
shailashree
shailashree
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 42
We have our application using SQL Server 2008 running on windows 2008 64 bit machine. The application was working fine for some days. Now the client has started reporting that the application hangs after certain transactions and that the cpu utilization of SQL Server 2008 is very high.

After analyzing this problem, we increased the max memory settings, AWE enabled options on that machine. After doing the setting changes, the application worked fine for two weeks. After two weeks the same problem has appeared again. The application has started hanging when the SQL Server cpu utilization is high.

RAM on the machine is 8GB. So we have configured 7 GB of RAM (max server settings) for SQL Server 2008.

Is this known issue wiith SQL Server 2008? Is there any solution to this problem? What can be done to stop my application from hanging?

Thanks in advance
GilaMonster
GilaMonster
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115708 Visits: 45520
Is SQL also 64 bit? If so, there's no need for AWE.

I'd drop the max memory down to 6GB. Letting SQL take just over 7 GB (the 7 is the size of the buffer pool, SQL also takes a small amount of non-paged memory) leaves the OS with very little and may cause problems.

High CPU may not be related to memory. It's most likely caused by poorly written queries and/or poor indexing. Is doing an optimisation exercise on the SQL databases possible, or is this vendor apps?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


shailashree
shailashree
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 42
Yes SQL is also 64 bit. Will there be any problem by enabling AWE on the machine? The application works fine on 32 bit OS, with SQL Server 2000/2005. This problem is happening with SQL Server 2008 only. The number of users using the system is more that 50 users.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115708 Visits: 45520
shailashree (8/20/2010)
Yes SQL is also 64 bit. Will there be any problem by enabling AWE on the machine?


AWE is ignored on 64 bit SQL. It is ONLY needed for 32 bit SQL Server.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


chetanr.jain
chetanr.jain
Say Hey Kid
Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)Say Hey Kid (664 reputation)

Group: General Forum Members
Points: 664 Visits: 563
Hi,
try to run performance monitor with memory related counter.
( Mostly Memory Manager -> Lock Memory, SQL Cache Memory, Target server Memory and Total Server memory).

Target server memory is the Memory which you are setting as max memory whereas total server memory is the current memory consumption.
vidhya sagar
vidhya sagar
SSC Eights!
SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)SSC Eights! (940 reputation)

Group: General Forum Members
Points: 940 Visits: 620
Have you enabled Lock pages in Memory for SQL Service account? If not provide the permission to SQL Service account. We faced similar problem (i.e memory is always full and paging out) and after adding the service account it got resolved

More info http://blogs.msdn.com/b/slavao/archive/2005/08/31/458545.aspx

Regards..Vidhya Sagar
SQL-Articles
shailashree
shailashree
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 42
Lock pages in memory is enabled for the sql server account. After enabling this option, the application worked fine for two weeks without any deadlock. The problem resumed again after two weeks.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)SSC Guru (115K reputation)

Group: General Forum Members
Points: 115708 Visits: 45520
shailashree (8/22/2010)
After enabling this option, the application worked fine for two weeks without any deadlock. The problem resumed again after two weeks.


Deadlocks are unlikely to be a result of memory configuration. Deadlocks are typically a result of badly-written queries and/or poor indexing. That's probably a better avenue to investigate for resolving the deadlocks.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Shark Energy
Shark Energy
SSC Eights!
SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)

Group: General Forum Members
Points: 989 Visits: 1018
If you literally meant deadlocks - thats a whole different story (monitor the locking).

If you meant freezing up - You may want to set a min server memory as well (plus your max is too high as mentioned for an 8gb machine). We had an issue where the system cache was eating into the SQL memory if it wasn't in use, and then it wouldn't reclaim the memory when needed even with locked pages switched on. Small chance this could be your reason.
Keep an eye on the Target and Total server memory counters in perfmon (as mentioned) and the system cache counters too.
TheSQLGuru
TheSQLGuru
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16986 Visits: 8600
Deadlock troubleshooting and resolution:

http://blogs.msdn.com/bartd/archive/2006/09/09/Deadlock-Troubleshooting_2C00_-Part-1.aspx

Note there are 2 additional parts to this blog series.


You can also get a professional on board who could probably resolve the issue in a matter of minutes or hours as opposed to many days like this has been going on.

Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search