免费注册 查看新帖 |

Chinaunix

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

squid速度变慢怎么解决? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-04 23:40 |只看该作者 |倒序浏览
我用squid做了代理服务器,但隔一段时间(有时十多分钟),客户端访问就变得很慢.登陆服务器后把squid重新启动一下又恢得正常,怎么解决这种问题呢?谢谢!

论坛徽章:
0
2 [报告]
发表于 2005-09-04 23:44 |只看该作者

squid速度变慢怎么解决?

看看 cache.log

论坛徽章:
0
3 [报告]
发表于 2005-09-04 23:57 |只看该作者

squid速度变慢怎么解决?

平时我也没有启用logs,这是cache.log显示的

2005/09/04 23:53:04| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2005/09/04 23:53:04| Process ID 1912
2005/09/04 23:53:04| With 1024 file descriptors available
2005/09/04 23:53:04| Performing DNS Tests...
2005/09/04 23:53:04| Successful DNS name lookup tests...
2005/09/04 23:53:04| DNS Socket created at 0.0.0.0, port 32774, FD 4
2005/09/04 23:53:04| Adding nameserver 61.128.128.68 from /etc/resolv.conf
2005/09/04 23:53:04| Adding nameserver 218.201.4.3 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 302
2005/09/04 23:53:07| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2005/09/04 23:53:07| Process ID 1915
2005/09/04 23:53:07| With 1024 file descriptors available
2005/09/04 23:53:07| Performing DNS Tests...
2005/09/04 23:53:07| Successful DNS name lookup tests...
2005/09/04 23:53:07| DNS Socket created at 0.0.0.0, port 32774, FD 4
2005/09/04 23:53:07| Adding nameserver 61.128.128.68 from /etc/resolv.conf
2005/09/04 23:53:07| Adding nameserver 218.201.4.3 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 302
2005/09/04 23:53:10| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2005/09/04 23:53:10| Process ID 1919
2005/09/04 23:53:10| With 1024 file descriptors available
2005/09/04 23:53:10| Performing DNS Tests...
2005/09/04 23:53:10| Successful DNS name lookup tests...
2005/09/04 23:53:10| DNS Socket created at 0.0.0.0, port 32774, FD 4
2005/09/04 23:53:10| Adding nameserver 61.128.128.68 from /etc/resolv.conf
2005/09/04 23:53:10| Adding nameserver 218.201.4.3 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.000 user + 0.010 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 302
2005/09/04 23:53:13| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2005/09/04 23:53:13| Process ID 1922
2005/09/04 23:53:13| With 1024 file descriptors available
2005/09/04 23:53:13| Performing DNS Tests...
2005/09/04 23:53:13| Successful DNS name lookup tests...
2005/09/04 23:53:13| DNS Socket created at 0.0.0.0, port 32774, FD 4
2005/09/04 23:53:13| Adding nameserver 61.128.128.68 from /etc/resolv.conf
2005/09/04 23:53:13| Adding nameserver 218.201.4.3 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 302
2005/09/04 23:53:16| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2005/09/04 23:53:16| Process ID 1925
2005/09/04 23:53:16| With 1024 file descriptors available
2005/09/04 23:53:16| Performing DNS Tests...
2005/09/04 23:53:16| Successful DNS name lookup tests...
2005/09/04 23:53:16| DNS Socket created at 0.0.0.0, port 32774, FD 4
2005/09/04 23:53:16| Adding nameserver 61.128.128.68 from /etc/resolv.conf
2005/09/04 23:53:16| Adding nameserver 218.201.4.3 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
        The parent directory must be writeable by the
        user 'nobody', which is the cache_effective_user
        set in squid.conf.
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 302

论坛徽章:
0
4 [报告]
发表于 2005-09-04 23:58 |只看该作者

squid速度变慢怎么解决?

如果把cache做在ramdisk里,性能会好些吗?

论坛徽章:
0
5 [报告]
发表于 2005-09-05 18:00 |只看该作者

squid速度变慢怎么解决?

问题基本解决了,是dnsserver在作怪,我重新编译了squid.不再出现这种情况.

http://numen.cqeda.com/


我用squid作的反向代理.

论坛徽章:
0
6 [报告]
发表于 2005-09-05 18:05 |只看该作者

squid速度变慢怎么解决?

说说是如何看出 dnsserver 作怪的?
重新编译为何就解决了?

论坛徽章:
0
7 [报告]
发表于 2005-09-05 18:16 |只看该作者

squid速度变慢怎么解决?

我自己编译的squid,默认编译的,做的反向透明代理.因为LAN内还有几台WEB服务器.但在/usr/local/squid/libexec 下没有dnsserver文件.
配置dns_children 5 后显示出错信息.

我看了一下squid.conf文档. 编译squid时要加上--disable-internal-dns选项,这样安装后的squid才能使用dns_children这项

重新编译配置后就正常了.
感谢各位兄弟!!

论坛徽章:
0
8 [报告]
发表于 2005-09-05 18:25 |只看该作者

squid速度变慢怎么解决?

但如果 dns 请求过多, 5 条就远远不够了
如果设置 dnsserver 数量过大,进程里会有 N 个这东西,很可怕的

论坛徽章:
0
9 [报告]
发表于 2005-09-05 18:38 |只看该作者

squid速度变慢怎么解决?

我记得以前我编译squid时  怎么也启动不了它
后面发现它是在启动的时候打DNS服务器
后我来加了一个-D选项   就让它启动起来了

这种情况如何在编译的时候克服啊?

谢谢

论坛徽章:
0
10 [报告]
发表于 2005-09-05 19:57 |只看该作者

squid速度变慢怎么解决?

近来发现我们的squid代理服务器在周六周日访问量小的时候出现上述问题,访问外部很慢,重起后能正常一段时间,小于20分钟。
凡是正常上班时间倒是还没遇到类似的问题。有时间俺也去看看那些纪录文件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP