Hardware Reference
In-Depth Information
This fits within 2 KB of the SwapTotal value of 102,396 KB reported by /proc/
meminfo .
The overcommit ratio is configurable by the user, by writing a value into the pseudo
file. This example changes the ratio to 35%:
$ sudo -i
# echo 35 >/proc/sys/vm/overcommit_ratio
# cat /proc/sys/vm/overcommit_ratio
35
The CommitLimit values reported by our example Raspberry Pi sessions are shown
in Table 4-2 for comparison purposes. A Model B pre Rev 2.0 version is also included here
for comparison.
Table 4-2. Example Model B to Model A Memory Comparisons
Model B Rev 2.0
Model B Pre 2.0
Model A
CommitLimit
326,892 KB
127,868 KB
95,416 KB
MemTotal
448,996 KB
124,672 KB
190,836 KB
SwapTotal
102,396 KB
65,532 KB
0 KB
Commit Ratio
50
50
50
With thanks to Dan Braun for providing the Model B Pre 2.0 data.
The value of the Model A commit ratio was calculated here since it wasn't available
from the website. But if you calculate the swap space S for it, you arrive at the value of -2 KB,
if you assume 50% for the commit ratio. This agrees with the 2 KB difference you saw earlier.
Committed_AS
This parameter is described as follows:
The amount of memory presently allocated on the system. The committed
memory is a sum of all of the memory which has been allocated by
processes, even if it has not been “used” by them as of yet. A process which
malloc() 's 1 GB of memory, but only touches 300 MB of it will only show
up as using 300 MB of memory even if it has the address space allocated
for the entire 1 GB. This 1 GB is memory which has been “committed”
to by the VM and can be used at any time by the allocating application.
With strict overcommit enabled on the system (mode 2 in vm.overcommit_
memory ), allocations which would exceed the CommitLimit (detailed
above) will not be permitted. This is useful if one needs to guarantee that
processes will not fail due to lack of memory once that memory has been
successfully allocated. 27
 
 
Search WWH ::




Custom Search