免费注册 查看新帖 |

Chinaunix

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

[proxy] squid最多支持cache多少个object? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-07 10:12 |只看该作者 |倒序浏览
有没有人研究过这个问题?目前我cache3000多万个object,出现squid进程自动重启了

具体的错误是

  1. FATAL: xcalloc: Unable to allocate 1 blocks of 1048640 bytes!

  2. Squid Cache (Version 2.6.STABLE20): Terminated abnormally.
  3. CPU Usage: 49892.603 seconds = 43028.331 user + 6864.272 sys
  4. Maximum Resident Size: 0 KB
  5. Page faults with physical i/o: 24
  6. Memory usage for squid via mallinfo():
  7.         total space in arena:  -130412 KB
  8.         Ordinary blocks:       -131780 KB    833 blks
  9.         Small blocks:               0 KB      0 blks
  10.         Holding blocks:        106564 KB    124 blks
  11.         Free Small blocks:          0 KB
  12.         Free Ordinary blocks:    1367 KB
  13.         Total in use:          -25216 KB 106%
  14.         Total free:              1367 KB -5%
  15. 2008/09/25 20:46:55| storeDirWriteCleanLogs: Starting...
  16. 2008/09/25 20:46:55| WARNING: Closing open FD   71
  17. 2008/09/25 20:46:55| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=71: (1) Operation not permitted
  18. 2008/09/25 20:46:55| WARNING: Closing open FD   72
  19. 2008/09/25 20:46:55| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=72: (1) Operation not permitted
  20. 2008/09/25 20:46:57|   Finished.  Wrote 0 entries.
  21. 2008/09/25 20:46:57|   Took 2.3 seconds (   0.0 entries/sec).
  22. 2008/09/25 20:47:01| Starting Squid Cache version 2.6.STABLE20 for x86_64-unknown-linux-gnu...
复制代码



我的存储方式是COSS

查了squid的FAQ,好像并不能解决我的问题

http://man.chinaunix.net/newsoft/squid/Squid_FAQ/FAQ-8.html#ss8.7 虽然有xmalloc: Unable to allocate的解释

Messages like "FATAL: xcalloc: Unable to allocate 4096 blocks of 1 bytes!" appear when Squid can't allocate more memory, and on most operating systems (inclusive BSD) there are only two possible reasons:

The machine is out of swap
The process' maximum data segment size has been reached



附上我的内存信息
  1. # free
  2.              total       used       free     shared    buffers     cached
  3. Mem:       8161516    8119484      42032          0      82800    3760492
  4. -/+ buffers/cache:    4276192    3885324
  5. Swap:      2096472        208    2096264
复制代码


附上一些squid的相关配置信息:
  1. cache_mem 512 MB
  2. cache_dir coss /cache/coss1 8000 membufs=100 max-size=128000
  3. .........................................................
  4. cache_dir coss /cache/coss29 8000 membufs=100 max-size=128000
  5. cache_dir coss /cache/coss30 8000 membufs=100 max-size=128000
  6. store_avg_object_size 25 KB
  7. store_objects_per_bucket 500
  8. memory_pools off
复制代码

[ 本帖最后由 killua 于 2008-10-7 10:14 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP