文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>一个修改hpux内存参数的shell

一个修改hpux内存参数的shell

时间:2007-09-01  来源:brain2007

#!/bin/sh

nproc=`kctune | grep nproc | awk '{print $2}'`

if [ $nproc -lt 4096 ]; then
nproc=4096
fi

ksi_alloc_max=`/usr/bin/expr $nproc \* 8`
executable_stack=0
max_thread_proc=1024
maxdsiz=1073741824
maxdsiz_64bit=2147483648
maxssiz=134217728
maxssiz_64bit=1073741824
maxuprc=`/usr/bin/expr $nproc \* 9 \/ 10`
msgtql=$nproc
msgmap=`/usr/bin/expr $msgtql + 2`
msgmni=$nproc
msgseg=32767
ninode=`/usr/bin/expr $nproc \* 8 + 2048`
ncsize=`/usr/bin/expr $ninode + 1024`
nfile=`/usr/bin/expr $nproc \* 15 + 2048`
nflocks=$nproc
nkthread=`/usr/bin/expr $nproc \* 7 \/ 4 + 16`
semmni=$nproc
semmns=`/usr/bin/expr $semmni \* 2`
semmnu=`/usr/bin/expr $nproc - 4`
semvmx=32767
#mem=4G
shmmax=4294967296
#mem=8G
#shmmax=8589934592
#mem=16G
#shmmax=17179869184
shmmni=512
shmseg=120
vps_ceiling=64

echo "ksi_alloc_max="$ksi_alloc_max
echo "executable_stack="$executable_stack
echo "max_thread_proc="$max_thread_proc
echo "maxdsiz="$maxdsiz
echo "maxdsiz_64bit="$maxdsiz_64bit
echo "maxssiz="$maxssiz
echo "maxssiz_64bit="$maxssiz_64bit
echo "maxuprc="$maxuprc
echo "msgtql="$msgtql
echo "msgmap="$msgmap
echo "msgmni="$msgmni
echo "msgseg="$msgseg
echo "ninode="$ninode
echo "ncsize="$ncsize
echo "nfile="$nfile
echo "nflocks="$nflocks
echo "nkthread="$nkthread
echo "semmni="$semmni
echo "semmns="$semmns
echo "semmnu="$semmnu
echo "semvmx="$semvmx
echo "shmmax="$shmmax
echo "shmmni="$shmmni
echo "shmseg="$shmseg
echo "vps_ceiling="$vps_ceiling

kmtune -s ksi_alloc_max=$ksi_alloc_max
kmtune -s executable_stack=$executable_stack
kmtune -s max_thread_proc=$max_thread_proc
kmtune -s maxdsiz=$maxdsiz
kmtune -s maxdsiz_64bit=$maxdsiz_64bit
kmtune -s maxssiz=$maxssiz
kmtune -s maxssiz_64bit=$maxssiz_64bit
kmtune -s maxuprc=$maxuprc
kmtune -s msgtql=$msgtql
kmtune -s msgmap=$msgmap
kmtune -s msgmni=$msgmni
kmtune -s msgseg=$msgseg
kmtune -s ninode=$ninode
kmtune -s ncsize=$ncsize
kmtune -s nfile=$nfile
kmtune -s nflocks=$nflocks
kmtune -s nkthread=$nkthread
kmtune -s semmni=$semmni
kmtune -s semmns=$semmns
kmtune -s semmnu=$semmnu
kmtune -s semvmx=$semvmx
kmtune -s shmmax=$shmmax
kmtune -s shmmni=$shmmni
kmtune -s shmseg=$shmseg
kmtune -s vps_ceiling=$vps_ceiling

kmtune -s semmni=4096
kmtune -s semmap=4200
kmtune -s maxswapchunks=16384
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载