What on earth is Commit charge?

ojas

Distinguished
Feb 25, 2011
2,924
0
20,810
Hello all,

I've been getting extremely confused by this for a long time now.

What does "Virtual Memory Committed" or "Commit Charge" mean?

Is Commit charge = Page file + RAM?

If that's true, and i see a virtual memory committed value lower than physical memory used, does that mean my system is not using page file at that moment?


Thanks!

Ojas
 

scurbox

Distinguished
Mar 5, 2010
17
0
18,510
In computing, commit charge is a term used in Microsoft Windows operating systems to describe the total amount of pageable virtual address space for which no backing store is assigned other than the pagefile. On systems with a pagefile, it may be thought of as the maximum potential pagefile usage. On systems with no pagefile, it is still counted, but all such virtual address space must remain in physical memory (RAM) at all times.


http://en.wikipedia.org/wiki/Commit_charge
 

ojas

Distinguished
Feb 25, 2011
2,924
0
20,810
I've read the wikipedia entry before, i've read knowledge base articles from MS...

see...

i have allocated a minimum of 8192MB for page file (max 16GB), and total installed RAM is 8192MB.

Sisoft Sandra shows the total page file as 16GB, which is fine. But it also shows me peak commits as 16GB, and total commits as 2.16GB

HWiNFO64 suggests a total of 16370 MB of Virtual Memory, if i add up committed+available. I've set a max of 16388, so where're the missing MBs?

total amount of pageable virtual address space for which no backing store is assigned other than the pagefile

On systems with a pagefile, it may be thought of as the maximum potential pagefile usage

Both statements suggest that Commit charge IS the pagefile, at least that's what i get from it.

But then Task manager shows me a total commit of 15GB, even if it's rounding off it should still show 16GB, if commit=page file.
And when Commit=2/15, does it mean 2GB is being used by the PF?

Also, virtual memory= physical +PF (+others?), and since from the wiki article Commit is the amount of the virtual memory that can be paged, i.e. written to disk (=>PF)...

So what the hell is Virtual Memory Committed in HWiNFO64? Is it total virtual memory? But then how can it be utilized less than physical memory (happened as i quit a multiplayer session of BF3)?

So is it actually "virtual memory committed to page file"? Then why isn't the total=amount of PF i've set?
 

ojas

Distinguished
Feb 25, 2011
2,924
0
20,810
I just dug up more info, will post as i find more:
http://www.windowsfordevices.com/c/a/Windows-For-Devices-Articles/What-is-virtual-memory/

I don't know how widely used this terminology is -- it may just be from Win32 -- but virtual addresses are either "committed" (have physical memory assigned to them), "reserved" (assigned to an allocation, like a DLL or stack or heap, but don't have physical memory assigned to them), or "free."

Windows CE will "demand commit" pages, meaning that it will usually delay committing them until the last possible moment. There are also some cases in which Windows CE will take committed pages out of memory again, returning them to "reserved" status (...)

However that is where Windows CE stops. Other operating systems have a "page file" in which they will write other pages that don't have corresponding files, notably:
Stack
Heap
Allocations from VirtualAlloc()
Memory-mapped files that don't actually have files underneath them (CreateFileMapping with INVALID_HANDLE_VALUE)
The writable data of executables (global variables)

Those operating systems have algorithms to decide that these pages have not been used in a while, and will write them to the page file and decommit the RAM. Windows CE does not have a page file. We'll demand-commit to delay committing these pages as long as possible, but once they are committed, the operating system won't page them out again.

So far what i get is that virtual memory committed is the amount of RAM being used, but then that doesn't make sense at all, since it's usually more than the used physical memory...though it's always proportional, so that's something to think about...

Perhaps it's the amount of pages committed to physical memory + kernel pages committed?
 

ojas

Distinguished
Feb 25, 2011
2,924
0
20,810
MOAR:
http://www.tweakhound.com/xp/virtualmemory.htm

When a process allocates a piece of private virtual memory (memory not backed by an image or data file on disk, which is considered sharable memory), the system charges the allocation against the commit limit. The commit limit is the sum of most of physical memory and all paging files. In the background the system will write these pages out to the paging file if a paging file exists and there is space in the paging file. This is an optimization only.
Your operating system will seek more virtual memory when the "commit charge" approaches the "commit limit".

What does that mean? In the simplest terms this is when your work is asking for more virtual memory (commit charge) than what the OS is prepared to deliver (commit limit).

For the technical terms the "commit charge" is the total of the private (non-shared) virtual address space of all of your processes. This will exclude however all the address that's holding code, mapped files, and etcetera.
 

ptrakk

Distinguished
Jan 20, 2012
3
0
18,510
HWiNFO64 suggests a total of 16370 MB of Virtual Memory, if i add up committed+available. I've set a max of 16388, so where're the missing MBs?

the missing megabytes are (when running in protected mode) the bios and other important memory that windows has cached and locked you away from changing.