2

I got the following negative PM (The amount of pageable memory that the process is using, in kilobytes) values when execute the ps command. What it means when the values are negative?

PS H:\> ps sqlservr

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
   5947    4145 -1218888    1537304   981 ...50.77   8344 sqlservr


PS H:\> ps sqlservr

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
   6060    4172 -1218876    1537316   981 ...52.08   8344 sqlservr


PS H:\> ps sqlservr

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
   6481    4258 -1218832    1537376   981 ...56.55   8344 sqlservr

The negative value may be the overflow of Int32? However, the following statements shows that the paged memory was 4TB? Which is not possible.

$m = [int32]::MaxValue
($m + ($m -1218832) + 2)/1024/1024
# returns 4094.83763122559 (GB)

1 Answer 1

1

Negative values can appear if the page file has grown at some point in the past, and has since shrunk. SQL Server uses lots of memory and pages a lot, so this type of behavior is pretty common for SQL Server.

Edit: This could also be because of the size of Int32... in which case, use the provided 64-bit property:

ps sqlserver | select WorkingSet64

or

ps sqlserver | select PagedMemorySize64

Most of the memory properties have corresponding 64-bit versions for this reason.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .