SQL Server consuming 90% Memory

  • Hello Masters,

    My sql server has 12GB of RAM, I got alerts from windows team that SQL Server consuming about 90% of memory ! SQL server is connected with many applications so its not possible for me to restart services of sql server.

    Is there anyway that it will release memory without restart ?

    I think AWE will help me, but i am not sure whether it will be in effect without restarting sql server. Please guide me how can I release memory without restarting sql server.

  • That's perfectly normal, expected behaviour. SQL will use as much memory as it can to improve performance.

    If it's using too much, lower max server memory, and inform the windows team that SQL should be using lots of memory, and for SQL Server machines, lots of free memory would be a concern

    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
  • jitendra.padhiyar (12/24/2012)


    I think AWE will help me, but i am not sure whether it will be in effect without restarting sql server. Please guide me how can I release memory without restarting sql server.

    ONLy if you are using 32 bit machine and also it requires sql server restart. see the link http://msdn.microsoft.com/en-us/library/ms190673(v=sql.105).aspx

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • GilaMonster (12/24/2012)


    If it's using too much, lower max server memory

    Is it dynamic change ? I mean if I will lower down the max memory, Will SQL server will release memory OR I need sql services restart?

  • jitendra.padhiyar (1/9/2013)


    GilaMonster (12/24/2012)


    If it's using too much, lower max server memory

    Is it dynamic change ? I mean if I will lower down the max memory, Will SQL server will release memory OR I need sql services restart?

    You can adjust that setting without a restart. The memory use will start to cycle down as queries complete and memory can be freed.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • jitender, are you still experiencing same memory issues ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • Thanks Jason ! I did changes in max memory, lower down 30GB Max memory to 28GB. and yes without restart it release some memory. Before it was consuming 31.7GB out of 32GB but now its consuming 30GB!

    Still have doubts... !! 🙂

    I have allocated max Memory to 28GB, than why its consuming 30GB ??! is it using any virtual OR Cache memory ? If yes, Please explain me how can I control it?

    @ Bhuvnesh : Now it releases some memory, but still want my SQL Sever to release more memory and want to know how it can use extra memory more than what I allocated..!!? Not sure but might be virtual memroy/Cache memory.

  • The max server memory setting controls the buffer pool. That's all of the caches (buffer pool, plan cache, etc) plus the query workspace memory. SQL can and does take memory outside of the buffer pool, usually a small amount, for the thread stacks, backup buffers, CLR memory, linked servers and a couple other things. This memory is almost always vastly smaller than the buffer pool.

    Again though, if SQL is using too much memory, reduce the value for max server memory slightly.

    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
  • I don't know if this helps, but we have a SQL Server with 72 GB of memory. It typically runs between 85% and 88%, but occasionally spikes to 92%. I have read that SQL Server will consume as much memory as you throw at it and want just a little bit more. No matter how much more you give it, it'll always use more. 😀

    I know it uses as much as it can to improve performance through caching and query plans and I've never found an upper limit.

  • Ed Wagner (1/14/2013)


    I have read that SQL Server will consume as much memory as you throw at it and want just a little bit more. No matter how much more you give it, it'll always use more. 😀

    memory usage not only dependent on how much memory you provide but also other factors too like

    •Slow, cheap storage (like SATA hard drives and 1Gb iSCSI)

    •Programs that needlessly retrieve too much data

    •Databases that don’t have good indexes

    •CPUs that can’t build query plans fast enough

    --------

    -(Thanks for bent ozar here :-D)

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

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

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