HP-UX 11.31数据库 服务器反应很慢,通过top看交换内存剩余量很小,所以怀疑交换内存过小问题 home/oracle> swapinfo -s Primary swap (for next boot) : Primary swap for next boot was not set using swapctl() Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 8388608 4030588 4358020 48% 0 - 1 /dev/vg00/lvol2 reserve - 3595536 -3595536 memory 15892540 6669364 9223176 42% 发现机器内存是16G,但是给定swap内存分配8G,所以决定扩展swap空间。 采用下面这个办法来扩充,可以简化 hp[/]#lvcreate -L 8096 -n myswap /dev/vg00 Logical volume "/dev/vg00/myswap" has been successfully created with character device "/dev/vg00/rmyswap". Logical volume "/dev/vg00/myswap" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf 然后将 /dev/vg00/myswap /myswap swap defaults 0 0 写进/etc/fstab中, 激活 hp[/etc]#mkdir /myswap hp[/etc]#swapon -a 现在看交换内存已经添加 hp[/etc]#swapinfo -atm Mb Mb Mb PCT START/ Mb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 8192 1502 6690 18% 0 - 1 /dev/vg00/lvol2 dev 8096 0 8096 0% 0 - 1 /dev/vg00/myswap reserve - 5159 -5159 memory 15520 4151 11369 27% total 31808 10812 20996 34% - 0 - 这样系统就正常了