i would like to know the exact difference between Commit Size (visible in the Task Manager) and Virtual Size (visible in SysInternals' Process Explorer).
The Virtual Size parameter in Process Explorer looks like a more accurate indicator of Total Virtual Memory usage by a process. However the Commit Size is always smaller than the Virtual Size and I guess it does not include all virtual memory in use by the process. I would like somebody to explain what is exactly included in these parameters.
Displays the size of the virtual memory used by Java virtual machine. Property.
Commit (KB). This is the total amount of physical and virtual memory (page file) that is committed to this specific process. Working Set (KB). This is the amount of physical memory that is committed to this particular process.
Displays the amount of virtual memory that can be committed without having to extend the paging file(s). Committed memory is the physical memory that is being used. The space for committed memory is reserved in the paging file. There can be one paging file on each logical drive.
Virtual size is the number of pages that the process has allocated, those pages not currently in the working set (physically loaded in RAM) will be in the system's page file. Typically you allocate memory that is not freed.
Memory can be reserved, committed, first accessed, and be part of the working set. When memory is reserved, a portion of address space is set aside, nothing else happens.
When memory is committed, the operating system guarantees that the corresponding pages could in principle exist either in physical RAM or on the page file. In other words, it counts toward its hard limit of total available pages on the system, and it formally creates pages. That is, it creates pages and pretends that they exist (when in reality they don't exist yet).
When memory is accessed for the first time, the pages that formally exist are created so they truly exist. Either a zero page is supplied to the process, or data is read into a page from a mapping. The page is moved into the working set of the process (but will not necessarily remain in there forever).
Every running process has a number of pages which are factually and logically in RAM, that is these pages exist, and they exist "officially", too. This is the process' working set.
Further, every running process has pages that are factually in RAM, but do not officially exist in RAM any more. They may be on what's called the "standby list" or part of the buffer cache, or something different. When these are accessed, the OS may simply move them into the working set again.
Lastly, every process has pages that are not in RAM at all (either on swap or they don't exist yet).
Virtual size comprises the size of all pages that the process has reserved.
Commit size only comprises pages that have been committed.
That is, in layman terms, "virtual size" is pretty much your own problem, and only limited by the size of your address space, whereas "commit size" is everybody's problem since it consumes a global limited resource (RAM plus swap). It therefore affects other processes.
Commit size is the amount of space reserved in the paging file for the process. Used when its pages need to be swapped out to make room in RAM for other processes.
And yes, the virtual memory size will be larger since it includes the pages that are not backed by the paging file. At least the code and resource sections in the EXE and non-relocated DLLs. When necessary, those pages can simply be discarded and reloaded from the file. All the operating system DLLs fit this category. Additionally any memory-mapped files used by the process. SysInternals' VMMap utility can give insight.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With