VMStatistics.mesa
last edited by Levin on August 22, 1983 9:49 am
DIRECTORY
VM USING [PageCount, VMPartition];
VMStatistics: DEFINITIONS =
BEGIN
This interface consists solely of procedures and variables that provide statistics on the instantaneous and historical state and behavior of the virtual memory system.
Virtual Memory Status
VirtualAllocation:
PROC [partition:
VM.VMPartition]
RETURNS [pagesAllocated, pagesFreed, pagesInPartition: VM.PageCount];
This procedure provides statistics on the state of virtual memory. "pagesAllocated" and "pagesFreed" count pages allocated and freed in the partition since the system was booted. "pagesInPartition" is the size of the partition. Thus, pagesInPartition - pagesAllocated + pagesFreed is the present number of free pages in the partition.
HistogramSizes: TYPE = LONG DESCRIPTOR FOR ARRAY OF INT;
HistogramCounts: TYPE = LONG DESCRIPTOR FOR ARRAY OF INT;
FreeSpaceHistogram:
PROC [
partition: VM.VMPartition ← normalVM,
sizes: HistogramSizes ← NIL, counts: HistogramCounts];
This procedure supplies a histogram of the runs of free pages in the specified partition of the virtual address space. The 'sizes' array gives the desired bin sizes for the histogram as described below; upon return, the 'counts' array contains the number of runs of free pages for each bin. If `sizes' is not NIL, it must have the following properties:
sizes.LENGTH > 0
sizes.LENGTH = counts.LENGTH - 1
sizes[0] > 0
sizes[i-1] < sizes[i] for i IN [1..sizes.LENGTH)
If sizes = NIL, the implementation behaves as though
sizes[i-1] = i, for i IN [1..counts.LENGTH)
A run of length k is counted as follows:
in counts[0] iff 0 < k <= sizes[0]
in counts[i] iff sizes[i-1] < k <= sizes[i], for i IN [1..sizes.LENGTH)
in counts[counts.LENGTH-1] iff k > sizes[sizes.LENGTH-1]
readOnlyPages:
INT;
number of pages in virtual memory that are presently readOnly.
pinnedPages:
INT;
number of pages in virtual memory that are presently pinned.
trappedPages:
INT;
number of pages in virtual memory that are pinned because a disk error prevented them from being written to backing storage.
checkoutConflicts:
INT;
number of times a VM operation was attempted on a page for which an I/O operation was in progress.
Performance of Replacement Algorithm
rmAllocPasses:
INT;
number of times the replacement algorithm has cycled through real memory.
rmReclamations:
INT;
total number of pages of real memory reclaimed since startup.
rmFreeList:
INT;
number of real pages reclaimed from free list. These are the most desirable candidates, but are likely to be relatively rarely available.
rmOldClean:
INT;
number of real pages reclaimed that were clean and not recently referenced. After pages on the free list, these are the most desirable candidates for reclamation and, if the replacement algorithm and laundry process are doing their jobs properly, are supposed to be the most numerous.
rmNewClean:
INT;
number of real pages reclaimed that were clean and recently referenced. If the number of these pages is a significant fraction of the total, either the working set is too large for the available real memory or the replacement algorithm isn't doing its job properly.
rmDirty:
INT;
number of real pages reclaimed that were dirty. If the number of these pages is a significant fraction of the total, the laundry process isn't doing its job properly.
Performance of VM.SwapIn
swapInCalls:
INT;
total number of calls on SwapIn
swapInVirtualRuns:
INT;
number of logical disk operations triggered by SwapIn
swapInPhysicalRuns:
INT;
number of physical disk operations triggered by SwapIn
swapInPages:
INT;
total number of pages SwapIn was asked to swap in
swapInAlreadyIn:
INT;
number of pages SwapIn was asked to swap in, but were already in.
swapInNoRead:
INT;
number of pages SwapIn was asked to swap in, but avoided reading because their data state was "undefined".
swapInReads:
INT;
number of pages actually read by SwapIn
swapInDirtyVictims:
INT;
number of dirty victims SwapIn was forced to remove synchronously because the laundry process wasn't keeping up.
swapInFailedToCleanVictims:
INT;
number of dirty victims SwapIn tried to swap out but was unable to do so.
Performance of VM.Clean
cleanCalls:
INT;
total number of calls on Clean
cleanVirtualRuns:
INT;
number of logical disk operations triggered by Clean
cleanPhysicalRuns:
INT;
number of physical disk operations triggered by Clean
cleanPages:
INT;
total number of pages Clean was asked to write out
cleanWrites:
INT;
number of pages actually written by Clean
cleanCantWrites:
INT;
number of pages Clean was asked to write out, but couldn't because they were pinned.
cleanCheckOutCleans:
INT;
number of clean pages Clean was checked out in anticipation of optimizing the sequence <dirty><clean><dirty> into a single write operation.
cleanUnneededCheckOutCleans:
INT;
number of pages for which the above strategy didn't pay off. The quantity cleanCheckOutCleans minus cleanUnneededCheckOutCleans is included in cleanWrites, above.
Performance of Laundry process
rmCleanPasses:
INT;
number of times the laundry process has cycled through real memory.
laundryWakeups:
INT;
number of times the laundry process woke up for any reason.
panicLaundryWakeups:
INT;
number of times the laundry process woke up because no clean memory was available to the replacement algorithm.
uselessLaundryWakeups:
INT;
number of times the laundry process woke up and was unable to perform any transfers.
pagesCleaned:
INT;
total number of pages cleaned by the laundry process.
pagesCleanedPanic:
INT;
number of pages cleaned by the laundry process during panic wakeups.
laundryCleanCalls:
INT;
number of calls on VM.Clean from laundry process.
Performance of VMSideDoor.GetFrames
getFramesCalls:
INT;
total number of calls on VMSideDoor.GetFrames
getFramesRetries:
INT;
number of times that the buffer needed to be expanded.
Performance of Fault Handlers
pageFaults:
INT;
total number of page faults handled.
writeFaults:
INT;
total number of write protect faults handled.
frameFaults:
INT;
total number of frame faults handled. 'frameFaults' should equal the sum of 'smallFramesAllocated' and 'largeFramesAllocated'.
smallFramesAllocated:
INT;
number of small frames (permanent) added to frame heap since startup.
frameHeapExtensions:
INT;
number of times that allocation of a small frame caused an extension of the frame heap.
largeFramesAllocated:
INT;
number of large frames (temporary) allocated since startup.
largeFramesFreed:
INT;
number of large frames (temporary) freed since startup.
Performance of VM.lowCore
lowCoreAllocations:
INT;
number of allocation requests from lowCore zone.
lowCoreWords:
INT;
number of words allocated in lowCore zone.
lowCorePages:
INT;
number of pages allocated to lowCore zone.
END.