Minimum memory requirement calculation
The minimum memory requirement of a program can be calculated easily.
Total memory pages (4 KB units) = T + ( N * ( PD + LD ) ) + F
where:
- T
- = Number of pages for text (shared by all users)
- N
- = Number of copies of this program running simultaneously
- PD
- = Number of working segment pages in process private segment
- LD
- = Number of shared library data pages used by the process
- F
- = Number of file pages (shared by all users)
Multiply the result by 4 to obtain the number of kilobytes required. You may want to add in the kernel, kernel extension, and shared library text segment values to this as well even though they are shared by all processes on the system. For example, some applications like CATIA and databases use very large shared library modules. Note that because we have only used statistics from a single snapshot of the process, there is no guarantee that the value we get from the formula will be the correct value for the minimum working set size of a process. To get working set size, one would need to run a tool such as the rmss command or take many snapshots during the life of the process and determine the average values from these snapshots. See Memory requirements assessment with the rmss command for more information.