LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 742|回复: 2

squid+nat遇到系统内存问题

[复制链接]
发表于 2006-2-21 16:34:53 | 显示全部楼层 |阅读模式
求助:
squid+nat带四十台机上网,系统自带256M内存,刚开机时,剩余一百多M吧,才一天下来,系统的256M的内存所剩无几,前两天加了一条256M,用了一天,底下是free的结果,怎样这两个东西这么吃内存,是不是哪里没有设好还是其它的问题?这样下去,就算用再多的内存也吃得完,,,,

squid.conf中
cache_mem 128 MB(应该设多少为合适呢,256时我设的96,现在设成128)


[root@gwsmb ~]# free
             total       used       free     shared    buffers     cached
Mem: 514536   217368     297168       0      62804     102200
-/+ buffers/cache:      52364     462172
Swap:      1052216          0    1052216
[root@gwsmb ~]#
这是top的结果:
top - 16:29:15 up 18:38,  1 user,  load average: 0.00, 0.00, 0.01
Tasks:  53 total,   2 running,  51 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0% us,  0.0% sy,  0.0% ni, 99.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    514536k total,   217752k used,   296784k free,    63076k buffers
Swap:  1052216k total,        0k used,  1052216k free,   102216k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      16   0  2152  556  476 S  0.0  0.1   0:00.47 init
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    3 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 events/0
    4 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 khelper
    5 root      15 -10     0    0    0 S  0.0  0.0   0:00.00 kacpid
   21 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 kblockd/0
   22 root      15   0     0    0    0 S  0.0  0.0   0:00.00 khubd
   31 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
   32 root      15   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
   34 root       8 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0
   33 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kswapd0
  108 root      25   0     0    0    0 S  0.0  0.0   0:00.00 kseriod
  187 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
1056 root       6 -10  3512  460  380 S  0.0  0.1   0:00.01 udevd
1372 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kauditd
1412 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 kmirrord
1413 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 kmir_mon
1439 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
1440 root      19   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
1441 root      15   0     0    0    0 S  0.0  0.0   0:00.03 kjournald
1442 root      15   0     0    0    0 S  0.0  0.0   0:00.02 kjournald
1443 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
1444 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kjournald
1445 root      15   0     0    0    0 S  0.0  0.0   0:00.08 kjournald
2052 root      16   0  2472  632  536 S  0.0  0.1   0:00.03 syslogd
2056 root      16   0  1664  472  404 S  0.0  0.1   0:00.00 klogd
2082 rpc       15   0  3404  576  480 S  0.0  0.1   0:00.00 portmap
2101 root      18   0  3628  752  652 S  0.0  0.1   0:00.00 rpc.statd
2127 root      16   0  4784 1008  840 S  0.0  0.2   0:00.00 rpc.idmapd
2191 root      17   0  2600  816  608 S  0.0  0.2   0:00.00 smartd
2201 root      18   0  2472  548  476 S  0.0  0.1   0:00.00 acpid
2252 root      16   0  3180  848  712 S  0.0  0.2   0:00.00 xinetd
2271 root      16   0  7552 3092 2060 S  0.0  0.6   0:00.00 sendmail
2279 smmsp     16   0  7932 2560 1760 S  0.0  0.5   0:00.00 sendmail
2289 root      16   0  2332  520  452 S  0.0  0.1   0:00.00 gpm
2298 root      16   0  6160 1164  756 S  0.0  0.2   0:00.00 crond
2318 xfs       16   0  3736 1088  820 S  0.0  0.2   0:00.00 xfs
2335 root      16   0  1796  736  616 S  0.0  0.1   0:00.00 atd
发表于 2006-2-21 17:00:32 | 显示全部楼层
很正常啊,你还有 451 MB 内存没使用呢。free 中第一行显示的只是缓存而已。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-21 17:31:10 | 显示全部楼层
这是我现在的情况
[root@gwsmb ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           502        208        293          0         64        101
-/+ buffers/cache:         42        459
Swap:         1027          0       1027
[root@gwsmb ~]#

刚看了一下资料,说其中used的208M,buffers用了64,cached用了101,也就是说系统总共才用了42,

原来是这样啊,害得我担心得死

谢谢楼上的兄弟
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表