SQL 2019 on Linux Max Memory

Evan King 21 Reputation points
2021-06-22T19:13:18.16+00:00

We have VM instances installed with Red Hat Linux as the OS and SQL Server 2019. I am trying to understand how the max memory works. I have read that SQL will use the maximum of 80% of the available memory for SQL, and that can be limited in the mssql.conf file. There is also another limit that you can change in SSMS for a maximum memory limit.

What I don't understand is which one takes precedents over the other. Here are the specs:

Total memory configured at the VM level: 512 GB
Total memory seen by SSMS in the Server Properties/General option under Memory: 412586 MB
Max memory seen by SSMS on the Server Properties/Memory option under Maximum server memory : 434360 MB (the same value as we have in out Windows SQL 2012 machines with the same 512 GB.

Thanks, Evan

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

Accepted answer
  1. AmeliaGu-MSFT 14,001 Reputation points Microsoft External Staff
    2021-06-23T07:44:47.72+00:00

    Hi EvanKing-7297,
    Welcome to Microsoft Q&A.
    Please refer to the following recommendation from this article which might help:

    There is no need to change any setup options for a Linux install from the defaults, because the memory.memorylimitmb setting will limit SQL Server to 80% of the available physical RAM by default.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 120.2K Reputation points MVP
    2021-06-22T21:38:44.58+00:00

    What you see on the General tab is how much memory SQL Server thinks is available in the server in total. When I look at this on instances that runs on Windows, I see the actual amount of memory in Windows. On my Linux instance, I see a lower number, which rather seems to be 75% of the RAM for the VM in this case. Why I don't know. In any case, the only way you can change this value is to add more RAM to the machine.

    What you see on the Memory page is the configuration setting "max server memory", which sets a limit for how much SQL Server can use for the buffer cache. In this case, it appears to exceed the size of available memory, and therefore it is the latter value that sets the limit in practice.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.