Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sql Server memory consumption reaching to high..


Sql Server memory consumption reaching to high..

Author
Message
pushpak0910
pushpak0910
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 5
Hi Friends,

I am facing a issue, since couple of days.
Sql server memory is slowly consuming all memory of server. And when it reaches to max limit, my applications hosted on server gets slow and stops working.

SQL Server is having 65 GB RAM

Min Limit set to 0, and Max limit set to 40GM, in sql server configuration.

I also scheduled to execute following scripts , in sql server agent.

CHECKPOINT
DBCC DROPCLEANBUFFERS

DBCC FREESESSIONCACHE

DBCC FREEPROCCACHE

DBCC FREESYSTEMCACHE('All')

I also tried -

EXEC sp_configure 'show advanced option', '1';

I tried to analyze memory consumption, using following scripts -

SELECT COUNT(*) AS CACHED_PAGES_COUNT,
NAME AS BASETABLENAME, INDEXNAME,
INDEXTYPEDESC
FROM SYS.DM_OS_BUFFER_DESCRIPTORS AS BD
INNER JOIN
(
SELECT S_OBJ.NAME, S_OBJ.INDEX_ID,
S_OBJ.ALLOCATION_UNIT_ID, S_OBJ.OBJECT_ID,
I.NAME INDEXNAME, I.TYPE_DESC INDEXTYPEDESC
FROM
(
SELECT OBJECT_NAME(OBJECT_ID) AS NAME,
INDEX_ID ,ALLOCATION_UNIT_ID, OBJECT_ID
FROM SYS.ALLOCATION_UNITS AS AU
INNER JOIN SYS.PARTITIONS AS P
ON AU.CONTAINER_ID = P.HOBT_ID
AND (AU.TYPE = 1 OR AU.TYPE = 3)
UNION ALL
SELECT OBJECT_NAME(OBJECT_ID) AS NAME,
INDEX_ID, ALLOCATION_UNIT_ID, OBJECT_ID
FROM SYS.ALLOCATION_UNITS AS AU
INNER JOIN SYS.PARTITIONS AS P
ON AU.CONTAINER_ID = P.PARTITION_ID
AND AU.TYPE = 2
) AS S_OBJ
LEFT JOIN SYS.INDEXES I ON I.INDEX_ID = S_OBJ.INDEX_ID
AND I.OBJECT_ID = S_OBJ.OBJECT_ID ) AS OBJ
ON BD.ALLOCATION_UNIT_ID = OBJ.ALLOCATION_UNIT_ID
WHERE DATABASE_ID = DB_ID()
GROUP BY NAME, INDEX_ID, INDEXNAME, INDEXTYPEDESC
ORDER BY CACHED_PAGES_COUNT DESC;
GO

--To see the number of pages cached in memory and the amount of RAM used in MB:

select count(*) AS Page_Count
,count(*) * 8 / 1024 as Cached_Size_MB
from sys.dm_os_buffer_descriptors


--To see the number of pages cached in memory and the amount of RAM used in MB for each database:

SELECT count(*)AS Page_Count
,count(*) * 8 / 1024 as Cached_Size_MB
,CASE database_id
WHEN 32767 THEN 'ResourceDb'
ELSE db_name(database_id)
END AS Database_name
FROM sys.dm_os_buffer_descriptors
GROUP BY db_name(database_id) ,database_id
ORDER BY Page_Count DESC;

--To see the count of pages cached in memory for each object in the current database:
USE TMS
GO

SELECT count(*)AS Page_Count
,object_name ,index_id
FROM sys.dm_os_buffer_descriptors AS bd
INNER JOIN
(
SELECT object_name(object_id) AS object_name
,index_id ,allocation_unit_id
FROM sys.allocation_units AS au
INNER JOIN sys.partitions AS p
ON au.container_id = p.hobt_id
AND (au.type = 1 OR au.type = 3)
UNION ALL
SELECT object_name(object_id) AS name
,index_id, allocation_unit_id
FROM sys.allocation_units AS au
INNER JOIN sys.partitions AS p
ON au.container_id = p.partition_id
AND au.type = 2
) AS obj
ON bd.allocation_unit_id = obj.allocation_unit_id
WHERE database_id = db_id()
GROUP BY object_name, index_id
ORDER BY Page_Count DESC;

But its not helping me out..

Can anyone pls suggest on the same?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47271 Visits: 44392
First things first, take that agent job out. Scheduling some major performance degradation is usually not something you do to a production system.

Is it SQL which is consuming the memory? How did you check?


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


pushpak0910
pushpak0910
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 5
Thnx Gail

Yes, I had disabled the job. Although I scheduled it temporarily.

Yes, SQLServer.exe is consuming all the available memory with the server.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47271 Visits: 44392
GilaMonster (3/19/2014)
Is it SQL which is consuming the memory? How did you check?



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


pushpak0910
pushpak0910
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 5
1. In task manager SQLServer.exe memory consumption is shown as 65GB
2. After restarting it, everything starts working normally for 17 to 18 Hours
3. Again memory consumption goes to 10%.
pushpak0910
pushpak0910
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 5
I mean again memory consumption goes to 100%, pls ignore 10%
dedicatedtosql
dedicatedtosql
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 303
Hello,

By default SQL Server is designed to use memory in large quantities, in order to cache data pages, plans and other DB objects in the Memory (Buffer pool).Under noramal conditions SQL Serevr will consume as much memory as it needs from the available RAM. When OS sets the memory low resource notification flag it is under these circumstances SQL Server will trim its working set (memory usage).

In order to avoid such a behaviour set the MAX_SERVER_MEMORY sp_configure option.

Refrence: http://www.red-gate.com/community/books/accidental-dba (Chap 4)
sqlbuddy123
sqlbuddy123
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1212 Visits: 2243
Are you experiencing any memory pressures on the server or memory related errors ?

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