Why less "target server memory" after run to log shipping job with secondary server on sql server on linux?

Maxpia 1 Reputation point
2021-06-11T03:18:01.31+00:00

My SQL Server version is "Microsoft SQL Server 2017 (RTM-CU22) (KB4577467) - 14.0.3356.20 (X64) Aug 20 2020 22:33:27 Copyright (C) 2017 Microsoft Corporation Standard Edition (64-bit) on Linux (CentOS Linux 7 (Core))"

Log shipping configuration: primary server is Windows and secondary server is linux.

Copy job is every 15 min, start 00:01.

Restore job is every 30 minis, start 00:03.

Less "Target Server Memory" after run to log shipping job with secondary server.

Linux doesn't keep the "Target Server Memory" it occupies like Windows does.

Why less "target server memory" after run to log shipping job with secondary server on sql server on linux?

Attached file is104565-memory-data.txt the relevant data.

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

1 answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 14,001 Reputation points Microsoft External Staff
    2021-06-11T09:47:39.563+00:00

    Hi 84448741,
    Sorry that I’m not familiar with SQL Server on Linux.
    If you are worrying about memory pressure, we can check Target Server Memory and Total Server Memory.

    SELECT object_name, counter_name, cntr_value  
    FROM sys.dm_os_performance_counters  
    WHERE [object_name] LIKE '%Memory Manager%'  
    AND [counter_name] IN ('Total Server Memory (KB)','Target Server Memory (KB)')  
    

    Target Server Memory indicates the ideal amount of memory the server can consume. Total Server Memory specifies the amount of memory the server has committed using the memory manager. During the initial buffer pool rise, the total server memory will be much lower than the target server memory. It is trying to fill the cache and load the page into memory. Due to the need for more disk I/O, performance may be slightly slower during this period, but this is normal. After it rises and resumes normal operation, the total server memory should be very close to the target server memory. (The ratio should be close to 1). If the total server memory has not increased too much, but is still significantly lower than the target, this may indicate:

    1. You may have allocated much more memory than SQL can use –SQL Server can cache the entire database in memory. If the database is smaller than the amount of memory on the machine, the data will not occupy all the space allocated to SQL. In this case, the total server memory (actually the memory used by SQL Server) will never reach the target server memory (the amount allocated to SQL). or,
    2. SQL cannot grow the buffer pool due to memory pressure from outside of SQL. If this is the case, you need to increase the maximum server memory, or add more RAM to improve performance.

    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.

    0 comments No comments

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.