Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2265 > unrolled thread

Memory usage: Working set much lower than Commit size

Started byAnton Shepelev <anton.txt@g{oogle}mail.com>
First post2025-06-03 11:51 +0300
Last post2025-06-03 20:44 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.databases.ms-sqlserver


Contents

  Memory usage: Working set much lower than Commit size Anton Shepelev <anton.txt@g{oogle}mail.com> - 2025-06-03 11:51 +0300
    Re: Memory usage: Working set much lower than Commit size Erland Sommarskog <esquel@sommarskog.se> - 2025-06-03 20:44 +0200

#2265 — Memory usage: Working set much lower than Commit size

FromAnton Shepelev <anton.txt@g{oogle}mail.com>
Date2025-06-03 11:51 +0300
SubjectMemory usage: Working set much lower than Commit size
Message-ID<20250603115159.77d340c71ff78daa318f55ef@g{oogle}mail.com>
Hello, all

One of our clients' servers (VMWare guest) was sagging under
RAM defficiency with nearly empty dm_exec_query_stats and
dm_exec_cached_plans until we unabled Lock Pages in Memory
for it:

  https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?view=sql-server-ver17

Now things look OK inisde MSSQL:

SELECT
     info.physical_memory_kb  / 1024                    AS phys_mem_mb  , -- 24 575
     info.committed_kb        / 1024                    AS committed_mb , -- 12 287
     info.committed_target_kb / 1024                    AS ci_target_mb , -- 12 288
     buf .mb                                            AS buf_size_mb  , -- 10 246
     pmem.memory_utilization_percentage                 AS mem_util_perc, --    100
     pmem.process_physical_memory_low                   AS phys_mem_low , --      0
     (  SELECT COUNT(*) FROM sys.dm_exec_query_stats  ) AS qstats_n     , -- 11 887
     (  SELECT COUNT(*) FROM sys.dm_exec_cached_plans ) AS qplans_n       -- 17 774
FROM
     sys.dm_os_sys_info       info,
     sys.dm_os_process_memory pmem,
     (    SELECT
          COUNT(*) * 8/1024 mb
          FROM sys.dm_os_buffer_descriptors
     ) buf

But /Task Manager/ shows the following for sqlservr.exe:

  Working set:    254 084 K
  Commit size: 12 855 404 K

Does it mean MSSQL has allocated 13G of RAM but is using
only 254M?  Or does the Working set somehow not include a
lot of RAM that MSSQL is using with /Lock Pages in Memory/
on?

-- 
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments

[toc] | [next] | [standalone]


#2266

FromErland Sommarskog <esquel@sommarskog.se>
Date2025-06-03 20:44 +0200
Message-ID<XnsB2F3D307742D9Yazorman@127.0.0.1>
In reply to#2265
Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> Does it mean MSSQL has allocated 13G of RAM but is using
> only 254M?  Or does the Working set somehow not include a
> lot of RAM that MSSQL is using with /Lock Pages in Memory/
> on?
> 

The latter.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.databases.ms-sqlserver


csiph-web