請問用squid架Proxy連線速度的問題?

這個版面主要討論 debian 在 server 端的應用問題, server 種類繁多..舉凡 Web Server 、 File Server、 DHCP Server..等等。

版主: 阿信

請問用squid架Proxy連線速度的問題?

文章cshjssy » 週五 9月 24, 2004 6:35 pm

小弟用debian stable架了nat和proxy伺服器

網路架構如下:
isp---adsl---eth1---server---eth0---switch---區網

區網用192.168.0.x的私有ip
isp是hinet浮動的(2M下載/256k上傳)
nat使用iptable,只有最簡單的ip分享功能
eth0,eth1為100M網卡

proxy使用squid
squid參考無痛和鳥哥的書
其中無注解的部份如下:
http_port 3128
icp_port 3130
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
maximum_object_size 32768 KB
cache_dir aufs /var/spool/squid/cache1 3900 16 256
cache_dir aufs /var/spool/squid/cache2 3900 16 256
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl nat src 192.168.0.0/24
http_access allow nat
http_access deny all

在終端使用方面
nat功能正常--可上網 www,bbs,msn等都可用
www設proxy功能時也可使用
此時若將伺服器之squid stop,則www無法連到網頁

這應表示squid有正常運做

可是在使用proxy重覆下載時,速度和第一次一樣只有200kB左右
在重覆下載時,若下載另一新的檔案,則兩個都有200kB左右
其中adsl下載頻寛大約是200kB
這應表示在重覆下載時,檔案是從proxy出來的
因這時下載速度是200kB+200kB=400kB

而由ifconfig的訊息:
eth0 Link encap:Ethernet HWaddr ----
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1574330 errors:0 dropped:0 overruns:0 frame:0
TX packets:2394755 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:117317314 (111.8 MiB) TX bytes:3385830014 (3.1 GiB)
Interrupt:18 Base address:0xdc00

eth1 Link encap:Ethernet HWaddr ---
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1152711 errors:0 dropped:0 overruns:0 frame:0
TX packets:738863 errors:47 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1482081680 (1.3 GiB) TX bytes:58489048 (55.7 MiB)
Interrupt:19 Base address:0xd880

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

ppp0 Link encap:Point-to-Point Protocol
inet addr:218.168.83.49 P-t-P:218.168.80.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:38556 errors:0 dropped:0 overruns:0 frame:0
TX packets:38306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2090227 (1.9 MiB) TX bytes:1664046 (1.5 MiB)

其中eth0輸出3.1G,eth1輸入1.3G
應也表示squid是正常運作的

小弟的疑問是:
在重覆下載時的速度為何不是區網的速度?
而會限制在200K左右呢?

是小弟設定的問題?還是本來就如此呢?
cshjssy
可愛的小學生
可愛的小學生
 
文章: 55
註冊時間: 週四 7月 15, 2004 5:45 pm
來自: 新竹

re:請問用squid架Proxy連線速度的問題?

文章aman » 週一 9月 27, 2004 12:41 am

maximum_object_size 32768 KB

下載超過 32MB 就不會 cache 了..
aman
可愛的小學生
可愛的小學生
 
文章: 6
註冊時間: 週一 9月 27, 2004 12:38 am
來自: Taipei


回到 debian server

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron