Operating System - HP-UX
1846992 Members
3536 Online
110257 Solutions
New Discussion

change kernel parameter and increase virtual memory

 
SOLVED
Go to solution
szhiyong
Frequent Advisor

change kernel parameter and increase virtual memory

Hi,

I want to change the maximum heap size for one process, such as 300MB. I also want to increase the maximum virtual memory for the process.

Would someone tell me which kernel parameters I should change? And How to do it by the command line?

Thanks a lot!

Zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
5 REPLIES 5
szhiyong
Frequent Advisor

Re: change kernel parameter and increase virtual memory

Hi,

My system is HP/UX 10.20, so I can not use kmtune.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: change kernel parameter and increase virtual memory

Almost certainly you need to increase maxdsiz to perhaps 320MB and maxssiz to perhaps 64MB.

While you can do this from the command line, it is much easier (and safer) to use SAM to make these changes and generate a new kernel and save the original in /stand/vmunix.prev. It does all the critical steps for you.

If it ain't broke, I can fix that.
Michael Tully
Honored Contributor

Re: change kernel parameter and increase virtual memory

I agree with Clay, you should use 'sam'
But if your really game here is the command line option...

# cd /stand/build
# /usr/lbin/sysadm/system_prep -s system
# vi system
Make your changes
Save the file
# mk_kernel -s system
Once successful you need to put the new kernel in place.

# mv /stand/vmunix /stand/vmunix.prev
# mv /stand/build/vmunix /stand/vmunix
# cd /
# shutdown -r -y 0
Anyone for a Mutiny ?
szhiyong
Frequent Advisor

Re: change kernel parameter and increase virtual memory

Hi,

Thanks a lot for help.

I will use the sam.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
Anonymous
Not applicable

Re: change kernel parameter and increase virtual memory

see
http://docs.hp.com//hpux/onlinedocs/os/KCparams.OverviewAll.html
and
http://docs.hp.com//hpux/onlinedocs/os/KCparam.ProcessParamsList.html

In case you have more than one system to apply the new kernel parameter set:
--
How to create a SD depot for kernel configuration changes
DocId: USDUXKBRC00008416 Updated: 11/8/01 8:40:00 AM

PROBLEM
I want to create a depot that only changes kernel configuration, e.g. some
kernel tunables. This is especially useful if tuning needs to be done on a
large number of systems while the end users are not skilled for such tasks.
Using auch depot end users would only need to perform a simple installaion.
CONFIGURATION
HP-UX 10.X, 11.X Software Distributor
RESOLUTION
You need to create a depot using the swpackage(1M) command. For this task
You
use a product specification file (psf) like this (see swpackage(4) manpage
for
details):


# ktune.psf
depot
product
tag ktune
title Dummy product for kernel tuning
fileset
tag ktune
title Dummy fileset for kernel tuning
is_reboot true
is_kernel true
end
postinstall ./ktune.postinstall
end
end


The real work during installation will be done by a script ktune.postinstall
which is referenced in the psf file.

This example simply adds driver 'stape' and configures nfile to 5000:


#!/sbin/sh
# ktune.postinstall, postinstall for kernel tuning

exitval=0
UTILS="/usr/lbin/sw/control_utils"
if [[ ! -f $UTILS ]]
then
echo "ERROR: Cannot find $UTILS"
exit 1
fi
. $UTILS

SYSTEM=$SW_SYSTEM_FILE_PATH
if [[ -z "${SW_DEFERRED_KERNBLD}" ]]
then
mod_systemfile $SYSTEM -a stape # add driver
mod_systemfile $SYSTEM -t nfile 5000 # tune nfile
if [[ $? -ne 0 ]]
then
print "ERROR: Cannot update $SYSTEM"
exitval=$FAILURE
fi
fi # end of "if [[ -z ${SW_DEFERRED_KERNBLD}" ]]

exit $exitval
# eof


Using the two files above (psf and postinstall script) You should be able to
create the desired depot using e.g. the command:

# swpackage -x target_type=tape -s ktune.psf @ /tmp/ktune.depot

Installing from ktune.depot using swinstall(1M) will apply the changes,
rebuild the kernel and reboot the system automatically, e.g.:

# swinstall -x autoreboot=true -s /tmp/ktune.depot \*
ALT KEYWORDS
SD SDUX depot kernel tunable tuning swpackage