免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2624 | 回复: 3
打印 上一主题 下一主题

文件系统缓存的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-12-10 09:46 |只看该作者 |倒序浏览
一个设备跑的linux 2.4.19内核,有64M内存, 没有交换分区,只要一开始大量写sd card时,设备的free momery就会少到1000k 左右, 如果这时再进行其它操作,系统很容易打印out of momery, 然后就开始杀进程。通过top查看文件系统的cache用了10多M,  能否有什么办法设置最低保留比如4M可用内存不能用于文件系统缓存? 另外是否有啥系统调用可以迅速释放cache?

多谢!

论坛徽章:
0
2 [报告]
发表于 2010-12-10 09:47 |只看该作者
附上


Mem: 62056K used, 928K free, 0K shrd, 460K buff, 12572K cached
Load average: 3.28, 3.72, 3.55    (State: S=sleeping R=running, W=waiting)

  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
  658 root     D        10M     1 12.6 17.1 recorder_writer
  841 root     S        968   620 11.9  1.5 ACVS.cgi
  863 root     S        968   620 11.7  1.5 ACVS.cgi
  365 root     S       1396     1  9.5  2.2 vcd
   13 root     RW         0     1  8.2  0.0 usb-storage-0
    4 root     SW         0     1  7.8  0.0 kswapd
  864 root     S        428   620  5.5  0.6 ACAS-MSADPCM.cg
1047 root     R        280   744  4.6  0.4 top
  843 root     S        428   620  4.4  0.6 ACAS-MSADPCM.cg
  512 root     S        608     1  3.7  0.9 motiond
    3 root     RWN        0     1  3.3  0.0 ksoftirqd_CPU0
  676 root     S        10M   675  1.8 17.1 recorder_writer
  409 root     S        356     1  1.8  0.5 acd
  677 root     S        10M   675  1.4 17.1 recorder_writer
  294 root     S        300     1  0.7  0.4 tssa
  117 root     S        460     1  0.5  0.7 watchDog
  283 root     S        536   279  0.3  0.8 orthrus
1041 root     S        536   279  0.3  0.8 orthrus
  298 root     S        272     1  0.3  0.4 presenced
/proc/sys/vm # ls
bdflush            max-readahead      min-readahead      page-cluster
kswapd             max_map_count      overcommit_memory  pagetable_cache
/proc/sys/vm #

论坛徽章:
0
3 [报告]
发表于 2010-12-10 11:30 |只看该作者
如果内存紧张后,系统会自动释放 cache吧。。。。
怎么会出现 out of memory 呢? 奇怪。

论坛徽章:
0
4 [报告]
发表于 2010-12-10 11:42 |只看该作者
是很奇怪  可能是驱动什么的没有把文件写入磁盘 一直占用着page cache
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP