?
Solved

SQl Server Max Memory usage

Posted on 2014-09-14
5
Medium Priority
?
218 Views
Last Modified: 2014-09-16
Hello experts,

I am looking into a SQL Server's performance outputs and I see an inconsistency with the following metrics.

1. When I query the physical memory in use by SQL with the following query, I get '8342' in MB:
SELECT
(physical_memory_in_use_kb/1024) AS Memory_usedby_MSSQL_MB,
FROM sys.dm_os_process_memory;

2. The SQL Server memory usage max and min values are set to 8000 and 0 respectively. I verify that both from UI and following SQL query:
SELECT name, value, value_in_use, [description]
FROM sys.configurations
WHERE name like '%server memory%'
ORDER BY name OPTION (RECOMPILE);

3. I am not sure if the SQL Server Services are restarted after the memory max and min is set. I believe they are but I cannot be 100% sure.

My question is, how come the physical memory used is higher than the max value. (Usage 8342 and max set is only 8000) What will be my next steps to troubleshoot the issue?

Thank you in advance
0
Comment
Question by:bozer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40322553
That's strange.
Can you check how much percentage of the MAX memory are in use?
select memory_utilization_percentage
from sys.dm_os_process_memory

Open in new window

0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 40323419
Max memory applies only to SQL buffers.  That is the vast majority of the RAM SQL uses, but not all of it.  There will be some modest RAM usage outside the buffers that will not be affected by the max memory setting.

Btw, you don't need to restart SQL Server instance to apply new memory settings, just RECONFIGURE.  If you lower the max setting, SQL may take some time to release the RAM, it doesn't even try to immediately reduce its RAM usage.
0
 

Author Comment

by:bozer
ID: 40324519
Hello Vitor, your query returns 100%

Scott, based on your explanation, is it safe to say it will not 'in theory' go too much beyond those numbers (8342) assuming 342 is the other SQL software usage type? I appreciate if you have an online article or something similar for this.

Also, I highly suspect this configuration is completed over UI. I know 'RECONFIGURE' is a part of the TSQL way of making this configuration. Is it still required to run the query on top of UI changes or does UI takes care of it?

Thanks
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 2000 total points
ID: 40325602
Check Books Online under "max server memory option".  Yes, RAM typically won't go much beyond that.  Certain special cases can drive it up, for example, if you have *lots* of linked servers and "Allow inprocess" is left unchecked.

Correct, the UI automatically applies the "RECONFIGURE" for you, so you do not need to run it separately.
0
 

Author Closing Comment

by:bozer
ID: 40325729
Thanks, I was able to understand the difference with your explanation.
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question