swap高手请进:为什么操作系统一直没有使用交换分区!!!

pengd 2003-10-07 08:12:27
我的操作系统是Redhat7.2,物理内存是2011M,SWAP交换分区的内存是2008M,系统运行许多服务,有apache,mysql,resin,postfix,imap等,系统运行了一整天,物理内存差不多用完了,而交换分区的内存仍然没有使用used=0,导致apache,mysql,resin,postfix,imap服务都死了,无法使用的,
我用free命令查看的结果是:
free -m
total used free shared buffers cached
Mem: 2011 2007 4 0 48 1719
-/+ buffers/cache: 238 1772
Swap: 2008 0 2008
我用top命令查看的结果是:
top
9:50pm up 1 day, 4:53, 3 users, load average: 1.20, 1.25, 1.26
536 processes: 533 sleeping, 2 running, 0 zombie, 1 stopped
CPU0 states: 0.1% user, 54.3% system, 0.0% nice, 45.1% idle
CPU1 states: 0.4% user, 60.0% system, 0.0% nice, 39.1% idle
Mem: 2059588K av, 2055364K used, 4224K free, 48K shrd, 49792K buff
Swap: 2056280K av, 0K used, 2056280K free 1761268K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
644 mysql 16 0 1884 1884 1476 R 99.9 0.0 1622m mysqld
28926 root 17 0 1384 1384 836 R 13.9 0.0 2:24 top
8 root 9 0 0 0 0 SW 0.3 0.0 1:48 kupdated
5 root 9 0 0 0 0 SW 0.1 0.0 147:17 kswapd
501 root 9 0 620 620 524 S 0.1 0.0 0:28 syslogd
8772 postfix 9 0 1240 1240 896 S 0.1 0.0 0:18 trivial-rewrite
29003 postfix 9 0 1492 1492 1100 S 0.1 0.0 0:00 smtpd
29028 mysql 9 0 17160 16M 1888 S 0.1 0.8 0:00 mysqld
1 root 8 0 520 520 452 S 0.0 0.0 0:03 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
4 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU1
6 root 9 0 0 0 0 SW 0.0 0.0 3:47 kreclaimd
7 root 9 0 0 0 0 SW 0.0 0.0 0:21 bdflush
9 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
15 root 9 0 0 0 0 SW 0.0 0.0 0:00 AIFd
19 root 9 0 0 0 0 SW 0.0 0.0 0:27 kjournald
94 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
506 root 9 0 1116 1116 448 S 0.0 0.0 0:00 klogd
请问高手是什么原因导致swap一直没有被使用的,谢谢!!!
...全文
1022 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
vitalgg 2003-10-08
  • 打赏
  • 举报
回复
/etc/fstab中必须存在
/dev/hdXX(注:你的交换分区) swap swap defaults 0 0
也可以是个文件.比如/SWAP

#swapon -a
pengd 2003-10-07
  • 打赏
  • 举报
回复
to netvt:
具体怎么运用swapon命令的,我试了好象不行的?
vitalgg 2003-10-07
  • 打赏
  • 举报
回复
可能是没有激活.
运行
#swapon
pengd 2003-10-07
  • 打赏
  • 举报
回复
swap交换分区是我新装操作系统时分区格式化的,大小为2008M,是不是大小不对的?还是没有激活swap分区的?
catxl313 2003-10-07
  • 打赏
  • 举报
回复
I am sorry for what I said just now.
catxl313 2003-10-07
  • 打赏
  • 举报
回复
Did the system find the patition of swap?

19,620

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧