What is the formula to calculate "CommitLimit" value on Red Hat Enterprise Linux 5 and 6 ?
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- CommitLimit
Issue
- The kernel documentation says on a system with 1G of physical RAM and 7G of swap with a vm.overcommit_ratio of 30 it would yield a CommitLimit of 7.3 G.
- Calculating the CommitLimit value using above entities and formula given in kernel documentation gives an incorrect result.
Eg:
CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap
= ( 30 * 1048576 ) + 7340032
= 38797312
= 37 GiB
Resolution
- The correct formula to calculate "CommitLimit" value is;
CommitLimit = ([total RAM pages] - [total huge TLB pages]) * overcommit_ratio / 100 + [total swap pages]
Eg:
CommitLimit = ([total RAM pages] - [total huge TLB pages]) * overcommit_ratio / 100 + [total swap pages]
= (( 1048576 - 0 ) * 30) / 100 + 7340032
= 7654604.8
= 7.3 GiB
Root Cause
- The formula to calculate "CommitLimit" value mentioned in kernel documentation is incorrect.
CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap
-
RHEL-6: [Private] Bug 1050174 - The formula to calculate "CommitLimit" value mentioned in kernel documentation is incorrect.
-
RHEL-5: [Private] Bug 1050185 - The formula to calculate "CommitLimit" value mentioned in kernel documentation is incorrect
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments