本文共 1279 字,大约阅读时间需要 4 分钟。
PAGE SPACE较高时,可以用vmstat,svmon定时跟踪一下,看看到底什么原因用掉内存,把不用的进程、多余的服务都KILL掉。或者也可以增加SWAP空间来缓解,下面看一个例子。
1、 查看SWAP空间大小和使用率,发现在 rootvg 的第一块硬盘上默认的分页逻辑卷为hd6
3、 查看rootvg卷的详细信息,发现剩余PPS为392个,每个PPS的大小为256M.
4、 根据计算,SWAP由原有的24G扩充到36G,需要增加48个PPS。使用 chps -s 命令,可以动态地增加分页空间的大小。(如果要缩小SWAP空间,需创建指向临时主机分页空间的一个临时引导映像和一个临时的 /sbin/rc.boot,以确保系统可安全重启。使用 chps -d 命令,动态地缩小分页空间的大小, 注意:chps -d 命令禁止把 hd6 的大小缩小到 32MB 以下或删除.)
total used free shared buffers cached
Mem: 513980 493640 20340 0 143808 271780
-/+ buffers/cache: 78052 435928
Swap: 1052248 21256 1030992
[root@test usr]# mkdir swap
[root@test swap]# dd if=/dev/zero of=swapfile bs=1024 count=10000
drwxr-xr-x 2 root root 4096 7月 28 14:58 .
drwxr-xr-x 19 root root 4096 7月 28 14:57 ..
-rw-r--r-- 1 root root 10240000 7月 28 14:58 swapfile
[root@test swap]# mkswap swapfile
Setting up swapspace version 1, size = 9996 KiB
[root@test swap]# swapon swapfile
total used free shared buffers cached
Mem: 513980 505052 8928 0 143900 282288
-/+ buffers/cache: 78864 435116
Swap: 1062244 21256 1040988
转载地址:http://qkddm.baihongyu.com/