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


SQL Server 2008 R2 Memory Hog


SQL Server 2008 R2 Memory Hog

Author
Message
DKY
DKY
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 158
I have an instance of SQL Server 2008 R2 installed on a VM with 4 cpus and 16 GB of RAM. It currently uses 15.5GB of memory and I can't get it to use less. I'm having problems logging into the VM because there's not enough memory for remote desktop to function properly. I've tried setting the "Maximum server memory" setting and currently have it at 4096 but it seems to do nothing. I'm still maxing out the memory. Can anyone help?
Shawn Melton
Shawn Melton
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2341 Visits: 3513
What process are you using to determine what amount of RAM the SQL Server instance is using?

The maximum server memory is only for what the buffer pool will allocate. At the other end the minimum setting is to specify when SQL Server has to release buffer pool memory it should not go below that value.

If you are using Task Manager to view the amount of RAM the "sqlservr.exe" process is using for your instance that is showing RAM for more than just the buffer pool.

Shawn Melton
PS C:\>(Find-Me).TwitterURL
@wsmelton
PS C:\>(Find-Me).BlogURL
meltondba.wordpress.com
DKY
DKY
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 158
Yes, I'm using task manager. I'm not sure what the "buffer pool" is but what I do know is that if I do the following commands
NET STOP "SQL Server Agent (BRKSQL02)"
NET STOP "SQL Server (BRKSQL02)"
then task manager shows that the total Memory used goes from 15.6GB to 800MB and other programs (such as remote desktop) are then usable, that is for the next hour or so when SQL Server hogs it back up again. Is changing the amount of buffer pool the wrong way to limit SQL Server? Should I have something in the "Minimum server memory"? Currently it's a 0.

Thanks for your response!
GilaMonster
GilaMonster
SSC Guru
SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)

Group: General Forum Members
Points: 89825 Visits: 45284
Min server memory is fine at 0. What's the exact value for max server memory?
Run
exec sp_configure 'show advanced', 1
RECONFIGURE
exec sp_configure 'max server memory'


What's the exact output?

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


DKY
DKY
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 158
When I run that code I get:

name__________________minimum_____maximum____config_value____run_value
max server memory (MB)____16______2147483647______4096_________4096
GilaMonster
GilaMonster
SSC Guru
SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)

Group: General Forum Members
Points: 89825 Visits: 45284
Ok, that is weird.

Will have to hunt for a memory breakdown script to see what's happening.

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


sqlbuddy123
sqlbuddy123
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2434 Visits: 2243
DKY (3/9/2014)
I have an instance of SQL Server 2008 R2 installed on a VM with 4 cpus and 16 GB of RAM. It currently uses 15.5GB of memory and I can't get it to use less. I'm having problems logging into the VM because there's not enough memory for remote desktop to function properly. I've tried setting the "Maximum server memory" setting and currently have it at 4096 but it seems to do nothing. I'm still maxing out the memory. Can anyone help?


Is SQL Server 32 bit or 64 bit ? Did you have Lock Pages in Memory enabled ?

And did you restart the SQL server after you changed the Max Memory to 4 GB ? This is to release excessive memory grabbed by SQL.

--
SQLServer
GilaMonster
GilaMonster
SSC Guru
SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)SSC Guru (89K reputation)

Group: General Forum Members
Points: 89825 Visits: 45284
sqlbuddy123 (3/10/2014)
And did you restart the SQL server after you changed the Max Memory to 4 GB ? This is to release excessive memory grabbed by SQL.


Max server memory does not require a restart. It is effective immediately.

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


DKY
DKY
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 158
I believe it's 64 bit (even though it seems to be installed in the 86 program files folder).
I followed this process for the lock pages in memory and there are no users or groups, it's blank.
http://msdn.microsoft.com/en-us/library/ms190730.aspx
The server was restarted over the weekend and it's still having this issue.
sqlbuddy123
sqlbuddy123
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2434 Visits: 2243
GilaMonster (3/10/2014)
sqlbuddy123 (3/10/2014)
And did you restart the SQL server after you changed the Max Memory to 4 GB ? This is to release excessive memory grabbed by SQL.


Max server memory does not require a restart. It is effective immediately.


Yeah, I know. This is true when going from lower value to higher value and not necessarily Vice Versa. That's why I mentioned
This is to release excessive memory grabbed


http://social.msdn.microsoft.com/Forums/en-US/7e245bab-b694-4db1-b148-bb31d8b20cea/sql-server-memory-setting-restart-required?forum=sqltools

--
SQLBuddy
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