HP-UX Virtual Partitions Administrator's Guide (includes A.03.05 and A.04.05)

C Calculating the Size of Kernels in Memory (PA-RISC only)
One requirement of vPars is the sum of sizes of the kernels running in memory within a hard
partition must be less than 2 GB. This only limits the maximum number of virtual partitions that
can be created. If you use the defaults of the dynamic tunables, you will not run into this 2 GB
limit. However, if you have adjusted the dynamic tunables, you can perform the calculations
described in this appendix to ensure you meet this criteria.
For more information on dynamic tunables, see the white paper Dynamically Tunable Kernel
Parameters in HP-UX 11i at http://docs.hp.com.
Calculating the Size of a Kernel
To calculate the size of the kernel, perform the following using the kernel file (for example,
/stand/vmunix) on the target OS:
1. Get the size of the kernel:
# size /stand/vmunix
[18784256 + 4775224 + 6696240 = 30255720
The size of the kernel is the final number: 30255720
2. Divide by (1024 * 1024):
((30255720) / (1024 * 1024)) + 1 = 29.85
3. Round up the result to the next multiple of 64 MB:
29.85 rounded to the next multiple of 64 MB = 64 MB
Use this number (64 MB) for the size of kernel. (Although the actual size of the kernel may
be closer to 30 MB, the minimum granularity with which memory is assigned to a partition
is 64 MB.)
Examples of Using the Calculations
Changing Dynamic Tunables
If you have already migrated to a vPars server and are adjusting the dynamic tunables of a kernel,
check that there is an available memory range under the 2 GB boundary to accommodate the
adjusted kernel. You should do this check after adjusting the dynamic tunables but before
rebooting the partition.
For example, suppose you calculated the size of an adjusted kernel to be 64 MB. Using
vparstatus -A, you can check whether there is an available memory range below the 2 GB
limit to accommodate the kernel size:
# vparstatus -A
...
[Unbound memory (Base/Range)]: 0x40000000/256
(bytes) (MB)
The output from vparstatus -A shows the following:
an available 256 MB memory range that can accommodate the 64 MB kernel and
an available memory range beginning at 0x40000000, which is below the 2 GB limit.
Therefore, the criteria will continue to be met after you reboot the partition.
Migrating OSs from non-vPars Servers to a vPars Server
If you are migrating from multiple non-vPars servers to one vPars server, sum up the results for
all the kernels and ensure that the result is under 2 GB.
5
5. Because the Monitor uses 64 MB, the actual number is 1984 MB.
Calculating the Size of a Kernel 307