Skip to main content
added 5 characters in body
Source Link
Shanky
  • 19.1k
  • 4
  • 36
  • 58

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager to check SQL Server memory utilization. TheyIt would never yieldshow you correct resultsresult. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private BytesProcess Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this wayvia AWE API is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager to check SQL Server memory utilization. It would never show you correct result. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated via AWE API is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

removed few blocks from answer to make it more clear
Source Link
Shanky
  • 19.1k
  • 4
  • 36
  • 58

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager or some other relevant tools to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Hope this is clear.

An other point to note is the task manager shows memory used by all OS processes so why are you even referring to it and making wrong conclusion about SQL Server. Remember, Task Manager is a Windows tool, not a SQL Server tool.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager or some other relevant tools to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Hope this is clear.

An other point to note is the task manager shows memory used by all OS processes so why are you even referring to it and making wrong conclusion about SQL Server. Remember, Task Manager is a Windows tool, not a SQL Server tool.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

Added link
Source Link
Paul White
  • 90.3k
  • 30
  • 423
  • 663

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager or some other relevant tools to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Hope this is clear.

An other point to note is the task manager shows memory used by all OS processes so why are you even referring to it and making wrong conclusion about SQL Server. Remember, Task Manager is a Windows tool, not a SQL Server tool.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager or some other relevant tools to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Hope this is clear.

An other point to note is the task manager shows memory used by all OS processes so why are you even referring to it and making wrong conclusion about SQL Server. Remember, Task Manager is a Windows tool, not a SQL Server tool.

What I am seeing is that in Task Manager, sqlserver.exe is using about 163 Mb of RAM, if I use procexp, the same service shows just under 500 MB of RAM used.

You should never look at task manager or some other relevant tools to check SQL Server memory utilization. They would never yield correct results. You should use a DMV sys.dm_os_process_memory, if you are using SQL Server 2008 and above, to check SQL Server memory utilization.

select 
(physical_memory_in_use_kb/1024) as PhyMemory_usedby_Sqlserver_MB, 
(locked_page_allocations_kb/1024 ) as Locked_pages_used_Sqlserver_MB, 
(virtual_address_space_committed_kb/1024 ) as Total_MemoryUsed_in_MB, 
process_physical_memory_low, 
process_virtual_memory_low 
from sys. dm_os_process_memory

Note:

PhyMemory_usedby_Sqlserver_MB is the committed memory and is backed by physical RAM.

Total_MemoryUsed_in_MB is the total memory used by SQL Server (RAM and page file)

You are making a mistake, which probably many 'newbies' make when referring to memory used by SQL Server. It would never show you correct memory utilization in task manager if Locked pages in memory privilege(LPIM) is there for the account running SQL Server service. This is because the task manager only shows Process Private Bytes, the memory allocated via Virtual_alloc function which is pageable. Now if the SQL Server service account has LPIM, most part of the memory allocation would be done by AWE API. The memory allocated this way is NOT pageable and thus does not shows up in task manager, which, in the end shows you different (incorrect) values.

Hope this is clear.

An other point to note is the task manager shows memory used by all OS processes so why are you even referring to it and making wrong conclusion about SQL Server. Remember, Task Manager is a Windows tool, not a SQL Server tool.

Further reading:

Fun with Locked Pages, AWE, Task Manager, and the Working Set… (CSS SQL Server Engineers)

added 5 characters in body
Source Link
András Váczi
  • 31.6k
  • 13
  • 101
  • 149
Loading
added 5 characters in body
Source Link
András Váczi
  • 31.6k
  • 13
  • 101
  • 149
Loading
Source Link
Shanky
  • 19.1k
  • 4
  • 36
  • 58
Loading