SQL Using More memory

Antony Maxwin 281 Reputation points
2021-08-11T03:24:49.113+00:00

Hi
i have 128 GB Memory in SQL Server, But twice a day i need to restart the Server for releasing memory that used by SQL, if The first day SQL uses 40 GB, then the Second day it reaches to 75 to 80 GB, it affect the performance. Is there any way that i can release memory without restarting.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 43,246 Reputation points
    2021-08-11T05:27:22.173+00:00

    It's by design that SQL Server allocate as much memory as it needs and as it can get. Once allocated it release memory only on OS preasure.

    Is this a server decicated for SQL Server? Then the memory usage should be an issue. Use Min/Max memory setting to keep some memory left for the OS, see Server memory configuration options

    What for perfomance problems do you mean? Hardly cause by SQL Server uses to "much" memory.

    1 person found this answer helpful.
    0 comments No comments

  2. Cris Zhan-MSFT 6,616 Reputation points
    2021-08-11T05:36:28.687+00:00

    Hi,

    By default, the settings in SQL Server allow it to use as much memory as possible on the server. If necessary, you can set a limit (max server memory). as follows.
    https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/server-memory-server-configuration-options?view=sql-server-ver15

    0 comments No comments

  3. Erland Sommarskog 107.2K Reputation points
    2021-08-11T21:44:20.483+00:00

    In addition to the other posts: if you are seeing performance issues, they are not due to the memory consumption. Rather, by re-starting SQL Server that frequently, you are making matters worse since data has to be read for disk instead from the cache. So stop doing that.

    Poor performance is usually due to bad queries and/or poor indexing. Possibly the high memory consumption is due to poorly performing queries.

    0 comments No comments