SQL Server Memory

  • HI Experts,

    I have a small concern again on SQL Server Memory issue as one of my prod server runs on SQL Server 2005 Enterprise edition 64 Bit, on windows 2003 enterprise 64bit edition. The Ram on the machine is 32GB and allotted memory for SQL Server is 26GB but even it’s taking much than that. Now I am not able to find which is taking much memory from SQL Side.

    Neither more applications nor instances are there, as it is a single instance with a 4 small databases size of 30GB. I have run some DMV sys.dm_exec_query_stats_qs and sys.dm_exec_sql_text and some more but couldn’t find any. Can you please let me know where i need to find what is happening?

    Thank you in Advance

  • Normal, expected behaviour. Max server memory sets the size of the buffer pool. SQL also uses something called non-buffer memory which is outside the buffer pool and hence over and above max server memory.

    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
  • Hi,

    Thank you for the reply... how to get back the memory which is used by SQL Server as we need some for OS as well. Here my concern is that the amount of memory is taken by SQL Server is not retrieving back. And thing is we cannot clear the buffer cache as it stores the latest transactions on the buffer pool and if we delete it, the performance may de grade as the SQL Server need to get the data from the drive or disk for the data.

    Please let me know what to do….

    Thank you in advance.

  • If SQL is using too much memory, reduce max server memory. Unless you're doing odd things with CLR, the non-buffer memory shouldn't be that high.

    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
  • When you suspect high memory usage by non-bufferpool components, use this query to find out large consumer.

    select Type, SUM(Multi_pages_kb)/(1024.00) Multi_MB From sys.dm_os_memory_clerks

    Group by type order by 2 desc

  • Hi Gail,

    Thank you for the reply, I will raise a CR and then I will reduce the ram memory for the SQL Server, but a doubt on this as how much memory do we need to allocate to the SQL Server in the Max memory.

    Hi dbasql79,

    Thank you for the query, When I run the query "select Type, SUM(Multi_pages_kb)/(1024.00) Multi_MB From sys.dm_os_memory_clerks

    Group by type order by 2 desc " I got the below results

    CACHESTORE_SQLCP -----------646.5703125

    MEMORYCLERK_SOSNODE-------16.5937500

    MEMORYCLERK_SQLSTORENG----12.4453125

    CACHESTORE_OBJCP------------7.7578125

    And yesterday when I opened the Prod SQL box I got a message that the Virtual memory was also utilized full, so what I need to do to overcome this problem

    Thank You in Advance.

  • I cant see any abnormal memory usage by other components.

    Please post the exact error messge. What is your page file size? Do your disk drive which hold pagefiles have enough free space?

  • Hi Dbasql79,

    The page files are set to 4096MB in both of the drives on C: and D: So total allocated page file size is 8192MB and C: drive is having 17.5GB space left and D: drive is having 30.5GB of space. But the team sees the cup & memory utilization of 100%. But I couldn’t find any such on server when I check. I have a doubt, page files allocated only on the server drives or can we allocate the page files on SAN.

    Is there any way where we can find memory used by the other components on the server.

    thank you in advance

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply