Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use perfmon, and according to MSDN, the "System Code Total Bytes" counter ...

Shows the size, in bytes, of pageable operating system code currently in virtual memory. It is a measure of the amount of physical memory being used by the operating system that can be written to disk when not in use. This value is calculated by adding the bytes in Ntoskrnl.exe, Hal.dll, the boot drivers, and file systems loaded by Ntldr/osloader. This counter does not include code that must remain in physical memory and cannot be written to disk.

But isn't that a contradiction? It says it is the "size in virtual memory" and the very next sentence it says it's the "amount of physical memory being used". From my understanding, just because virtual memory exists does not mean there is any physical memory mapped to it because memory can be paged to the pagefile on disk when there isn't enough phsyical ram. so size of virtual memory and size of physical memory are distinctly different.

another thing which confuses me is that the "value is calculated by adding the bytes in Ntoskrnl.exe, Hal.dll, the boot drivers, and file systems loaded by Ntldr/osloader". So wouldn't that number be a constant irrespective of how much of those files are loaded into virtual/physical memory?

Can someone help me understand what this counter means?

share|improve this question

1 Answer 1

It is probably a typo since the related counter, "System Code Resident Bytes", includes the description "Shows the size, in bytes, of operating system code currently in physical memory that can be written to disk when not in use." It is further explained that "This value is a component of Memory\ System Code Total Bytes, which also includes operating system code on disk."

Thus, "System Code Total Bytes" is the total bytes in virtual memory, which includes both resident (in physical memory) and non-resident (on disk).

Regarding the second question: The value for "System Code Total Bytes" may indeed be fairly constant, but "System Code Resident Bytes" may not be. The total bytes is there to help calcluate percentages of resident/non-resident bytes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.