SQL Server 2019 on linux - memorylimitmb vs. max server memory

  • Short question:

    What relationship does the memorylimitmb value (from /opt/mssql/bin/mssql-conf get memory) have with SQL Server's "max server memory" value?

    Long story:

    We have a new instance of SQL Server 2019 web edition running on linux. The linux environment has 64G RAM, the maximum amount allowed for web edition. Once the server was under load, query performance became poor, and we discovered that about 3G of the 64G was being used (exec sp_configure 'max server memory (MB)' returned '2828').

    Our natural response was to reconfigure max memory.

    When we reconfigured max server memory to 90% of RAM (exec sp_configure 'max server memory (MB)', '58235'), it rendered our SQL Server instance immediately inaccessible. We couldn't connect to the instance from SSMS, and restarting the service (systemctl restart mssql-server) hung. We finally had to reboot the box, which brought the instance back online.

    We then set max memory back down to 2828 MB.

    Somewhere during this incident, we discovered this linux command:

    /opt/mssql/bin/mssql-conf get memory # returned "memorylimitmb 2828"

    And, subsequently, we guess (yikes!) we should set memorylimitmb to 70% of RAM (instead of 90%, to be conservative):

    /opt/mssql/bin/mssql-conf set memory.memorylimitmb 45294 # 70% of RAM

    All that brings me to the question at the top of my post. 🙂

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 1 (of 1 total)

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