鱿鱼使互联网变慢

nir*_*ren 2 proxy squid ubuntu-12.04

我已经在 ubuntu 服务器上的网络中配置了鱿鱼代理。所有流量都被 Mikrotik 路由器转移到代理服务器。配置鱿鱼代理后,我更改/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
Run Code Online (Sandbox Code Playgroud)

我在 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
Run Code Online (Sandbox Code Playgroud)

现在我们网络的互联网连接非常慢。一旦我禁用将所有流量转移到鱿鱼代理服务器的规则,我们就会获得更快的互联网。我怎样才能让鱿鱼代理服务器非常快。

附加信息

OS: Ubuntu server 12.04.
RAM: 512 MB.
HardDisk: 80 GB.
Processor: Pentium 4.
Squid: version 3.1.19
Run Code Online (Sandbox Code Playgroud)

我没有在鱿鱼中配置缓存来使互联网快速但没有用。

lza*_*zap 5

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

  • 确保您的鱿鱼系统上的 DNS 解析速度快(尝试“host www.google.com”,确保您拥有快速的 DNS 服务器 - 您可以设置 Google 快速 DNS:8.8.8.8 和 8.8.4.4)
  • 计算缓存使用多少内存:http : //wiki.squid-cache.org/SquidFaq/SquidMemory
  • 确保您的服务器没有交换。
  • 将您的磁盘缓存放在仅专用于磁盘缓存的单独分区上,而没有其他任何内容(这很重要)。
  • 为缓存选择合适的文件系统(我推荐带有 dir_index 选项的 ext4!)
  • 调整您的磁盘缓存设置:http : //www.squid-cache.org/Doc/config/cache_dir/(非常重要 - 取决于大小和预期文件 - 它们是大还是小?)
  • 监控您的服务器并随着时间的推移进行调整(您无法在第一天实现完美的设置 - 您需要在缓存填满后重新访问您的设置)。