Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SQL Server 2008 R2 Memory Hog Expand / Collapse
Author
Message
Posted Sunday, March 9, 2014 7:41 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, March 20, 2014 12:17 PM
Points: 13, Visits: 23
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?
Post #1549091
Posted Sunday, March 9, 2014 11:32 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 10:20 AM
Points: 843, Visits: 2,314
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
Post #1549102
Posted Monday, March 10, 2014 4:50 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, March 20, 2014 12:17 PM
Points: 13, Visits: 23
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!
Post #1549172
Posted Monday, March 10, 2014 5:12 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
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 2008, MVP
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

Post #1549178
Posted Monday, March 10, 2014 5:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, March 20, 2014 12:17 PM
Points: 13, Visits: 23
When I run that code I get:

name__________________minimum_____maximum____config_value____run_value
max server memory (MB)____16______2147483647______4096_________4096
Post #1549184
Posted Monday, March 10, 2014 5:30 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
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 2008, MVP
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

Post #1549186
Posted Monday, March 10, 2014 9:45 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 2:57 PM
Points: 1,194, Visits: 2,211
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
Post #1549319
Posted Monday, March 10, 2014 9:56 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 42,469, Visits: 35,540
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 2008, MVP
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

Post #1549334
Posted Monday, March 10, 2014 10:32 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, March 20, 2014 12:17 PM
Points: 13, Visits: 23
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.
Post #1549371
Posted Monday, March 10, 2014 10:46 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 2:57 PM
Points: 1,194, Visits: 2,211
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

Post #1549378
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse