鱿鱼使互联网变得缓慢

我在ubuntu服务器的networking上configuration了squid代理。 所有的stream量被Mikrotik路由器转移到代理服务器。 configuration/etc/squid3/squid.conf鱿鱼代理之后,我把/etc/squid3/squid.conf改为

 http_port 8080 #changed from default port 3128 /var/log/squid3/access.log #uncomment access log variable_hostname myproxy #added http_access allow all #added 

我已经添加了以下几行squid.conf来使鱿鱼高度匿名

 forwarded_for transparent header_access Allow allow all header_access Authorization allow all header_access Cache-Control allow all header_access Content-Encoding allow all header_access Content-Length allow all header_access Content-Type allow all header_access Date allow all header_access Expires allow all header_access Host allow all header_access If-Modified-Since allow all header_access Last-Modified allow all header_access Location allow all header_access Pragma allow all header_access Accept allow all #header_access Accept-Enncoding allow all header_access Accept-Language allow all header_access Content-Language allow all header_access Mime-Version allow all header_access Cookie allow all header_access Set_Cookie allow all header_access Retry-After allow all header_access Title allow all header_access Connection allow all header_access Proxy-Connection allow all header_access All deny all header_replace User-Agent anonymous 

现在我们networking的互联网连接速度很慢。 当我禁用将所有stream量转移到鱿鱼代理服务器的规则,我们得到更快的互联网。 我怎样才能使鱿鱼代理服务器非常快。

附加信息

 OS: Ubuntu server 12.04. RAM: 512 MB. HardDisk: 80 GB. Processor: Pentium 4. Squid: version 3.1.19 

我没有在鱿鱼configurationcaching,使互联网快速,但没有用。

服务器看起来像旧的硬件。 对于HTTP代理,有必要以这种方式调整您的设置:

  • 确保DNS在你的squid系统上快速parsing(尝试“主机www.google.com”,确保你有快速的DNS服务器 – 你可以设置Google快速DNS:8.8.8.8和8.8.4.4)
  • 计算多less内存用于caching: http : //wiki.squid-cache.org/SquidFaq/SquidMemory
  • 确保你的服务器不交换。
  • 把你的磁盘caching放到单独的分区上,专用于磁盘caching,没有别的(这很重要)。
  • 为cachingselect合适的文件系统(我推荐带dir_index选项的ext4!)
  • 调整您的磁盘caching设置: http : //www.squid-cache.org/Doc/config/cache_dir/ (非常重要 – 取决于大小和预期的文件 – 是大还是小?)
  • 监控你的服务器并随着时间的推移进行debugging(第一天你不能达到完美的设置 – 当caching填满之后,你需要重新访问你的设置)。

为了完整性…

你的硬件已经超过十年了, 你应该期望它像十年前的硬件一样performance! 虽然你一定要调整你的鱿鱼服务器,但是当它运行在这个古老的怪物上时,除了使用更多的硬件之外,没有什么帮助。