Kernel Memory Allocation

How kernel memory is allocated and may be controlled in a vPar PA-RISC environment
A. Initially creating vPars
Create each vPar defining the base and range of memory to be some value that you are sure the
kernel will not grow beyond. For example, if the current kernel is using 192MB of contiguous
space, then specify a range of 256MB or whatever you think the kernel could possibly grow to in
64MB chunks. So with an nPar of 4GB RAM, to create 2 vPars, each with 256MB of lower 2GB
memory space and 2GB of total memory you would use the commands:
vparcreate -p vp1 -a mem::2048 -a mem:::0:256
vparcreate -p vp2 -a mem::2048 -a mem:::268435456:256
Note: the vparcreate commands above are only showing the memory specification
What you have done here is assigned the total 4GB of memory to the 2 vPars but more importantly
you have made sure that each vPar has up to 256MB of lower 2GB memory address space to put
their kernels in. Now as long as it stays within 256MB you have made sure that an increase in the
size of either kernel will fit.
A consideration here is the creation of additional vPars. If you wish to create a new vPar, the
second vPar above (vp2) must be rebooted specifically to free up lower 2GB memory space since it
loaded second and it used up the rest of the lower 2GB memory space. Of course you will also
need to free up "regular" memory since in the example above it is all used up. This will be given
to the new vPar in addition to lower 2GB space depending on the total memory requirement for the
new vPar. This additional memory can come from either existing vPar and does require a reboot of
that vPar.
B. Slight variation on solution “A” above
Use solution “A” above, but make sure the total sum of all the memory allocated to the vpars is less
than the total of the nPar/System. For example,
vpar_mem_max = (total_phy_mem - (2GB – sum_of_range_values))
where
vpar_mem_max is the total usable/assignable memory combined for all vPars to use and
total_phy_mem is the total physical memory in the nPar/system and
sum_of_range_values is the sum of the range values specified for each vPar.
The result is that you will always be assured that whatever lower 2GB address space is unused by
kernels will remain unused and not be given to a vPar for regular memory use. For example vPar1
has a range of 256MB and vPar2 has a range of 512MB and there is 4GB in the nPar you would
use the following expression:
vpar1 range = 256
vpar2 range = 512
Page 4 of 5