請問squid正常反應是幾秒? |
尚未結案
|
apc
一般會員 發表:29 回覆:36 積分:13 註冊:2005-01-10 發送簡訊給我 |
是用CPU 700MHz,Ram 128, 6G Hdd做squid server
平均開一個網頁是要7~8秒.開第二次是約1秒左右.
測試了一下這是因為區域內的机器有Cache的功能才會這麼快.
如果IE關掉後再上網一樣是平均開一個網頁是要7~8秒.
區域內的机器到squid server不是區域網路100M的速度?
那開昨天開過的網頁應該不用到2秒才對,
不知道那位大大有squid.conf的設定檔供參考?
不知道是否peer及dns要設?在下的squid server上沒裝dns
用netstat 看squid是有起動
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN
squid的Cache內有很多目錄,但好像是空的.
這是要怎麼檢查?比如說下什麼指令看這Cache目錄的容量是否有增加?
|
alanktop
一般會員 發表:7 回覆:21 積分:5 註冊:2005-03-01 發送簡訊給我 |
似乎cache没有运行正常? su作为nobody,进入/usr/local/squid/bin目录,执行#squid -z 创建
cache交换目录 #su nobody
$ cd /usr/local/squid/bin
$./squid -z 成功后,测试一下:/usr/local/squid/bin/squid -NCd1 该命令正式启
动Squid。如果一切正常,你会看到一行输出 :Ready to serve requests.
用ctrl-c退出前台测试。 把squid作为守护进程启动就直接运行:/usr/local/squid/bin/squid & 检查状态用squid –k check
看看/var/log/squid相关log有无异常?
|
alanktop
一般會員 發表:7 回覆:21 積分:5 註冊:2005-03-01 發送簡訊給我 |
here is a sample: # WELCOME TO SQUID 2
# ---------------------------------------
# NETWORK OPTIONS
http_port 3128
icp_port 3130
#htcp_port 4827
#mcast_groups 239.128.16.128
#tcp_outgoing_address 0.0.0.0
#udp_incoming_address 0.0.0.0
#udp_outgoing_address 0.0.0.0
# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
cache_peer proxy.netlab.sk parent 3128 3130
#cache_peer proxy-main.cvt.stuba.sk parent 3128 3130
cache_peer proxy.euroweb.sk parent 3128 3130
#icp_query_timeout 0
#maximum_icp_query_timeout 2000
#mcast_icp_query_timeout 2000
#dead_peer_timeout 10 seconds
hierarchy_stoplist cgi-bin ?
#acl QUERY urlpath_regex cgi-bin \?
#no_cache deny QUERY
# OPTIONS WHICH AFFECT THE CACHE SIZE
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 50 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
# LOGFILE PATHNAMES AND CACHE DIRECTORIES
cache_dir ufs /cache/squid 1004 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_swap_log /cache/squid/swap.log #emulate_httpd_log on
#mime_table /etc/squid/mime.conf
#log_mime_hdrs off
#useragent_log none
#pid_filename /var/run/squid.pid
debug_options ALL,1
#log_fqdn off
client_netmask 255.255.255.255
# OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
ftp_user proxy@spsslm.sk
#ftp_list_width 32
#ftp_passive on
#cache_dns_program /usr/lib/squid/dnsserver
#dns_children 5
#dns_defnames off
#dns_nameservers none
unlinkd_program /usr/lib/squid/unlinkd
#pinger_program /usr/lib/squid/pinger
#redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf
#redirect_children 4
#redirect_rewrites_host_header on
#redirector_access
#authenticate_program none
#authenticate_children 5
#authenticate_ttl 3600
#authenticate_ip_ttl 0
# OPTIONS FOR TUNING THE CACHE
#wais_relay_host localhost
#wais_relay_port 8000
#request_header_max_size 10 KB
#request_body_max_size 1 MB
#reply_body_max_size 0
#refresh_pattern ^ftp: 1440 20% 10080
#refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#replacement_policy LFUDA
reference_age 1 day
quick_abort_min 16 KB
quick_abort_max 16 KB
#quick_abort_pct 95
#negative_ttl 5 minutes
#positive_dns_ttl 6 hours
#negative_dns_ttl 5 minutes
#range_offset_limit 0 KB
# TIMEOUTS
#connect_timeout 120 seconds
#peer_connect_timeout 30 seconds
#siteselect_timeout 4 seconds
#read_timeout 15 minutes
#request_timeout 30 seconds
#client_lifetime 1 day
#half_closed_clients on
#pconn_timeout 120 seconds
#ident_timeout 10 seconds
#shutdown_lifetime 30 seconds # ACCESS CONTROLS
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 21 443 563 70 210 1025-65535
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 CONNECT method CONNECT
# Z vonkajsej strany
acl spsslm src 195.168.210.8/255.255.255.248
# Z vnutornej strany
# Pripojeny len webmaster
acl vip src 192.168.2.1-192.168.2.2
# Ucitelske stanice:
# Riaditelka
acl riaditel src 192.168.2.4
# Zastupkyna
acl zastupca src 192.168.2.5
# Sekretarka
acl sekretar src 192.168.2.6
# Hospodarka
acl hospodar src 192.168.2.7
# Kabinet matemetiky
acl kabmat src 192.168.2.8
# Kabinet ekonomiky
acl kabeko src 192.168.2.9
# Kabinet stavbari
acl kabstv src 192.168.2.10
# Kabinet tzb
acl kabtzb src 192.168.2.11
# Kabinet cudzich jazykov
acl kabcuj src 192.168.2.12
# Kabinet slovenciny
acl kabsjl src 192.168.2.13
# Kabinet telocviku
acl kabtev src 192.168.2.14
# Pripojene ziacke stanice:
acl operat src 192.168.2.17
acl prva src 192.168.2.21
acl druha src 192.168.2.22
acl tretia src 192.168.2.23
acl stvrta src 192.168.2.24
acl piata src 192.168.2.25
acl siesta src 192.168.2.26
acl siedma src 192.168.2.27
acl osma src 192.168.2.28
acl deviata src 192.168.2.29
acl desiata src 192.168.2.30
acl jedenasta src 192.168.2.31
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow spsslm
http_access allow vip
http_access allow riaditel http_access allow zastupca
http_access allow sekretar
http_access allow hospodar
http_access allow kabmat
http_access allow kabeko
http_access allow kabstv
http_access allow kabtzb
http_access allow kabcuj
http_access allow kabsjl
http_access allow kabtev
# Ziaci mozu na internet
#http_access allow operat
#http_access allow prva
#http_access allow druha
#http_access allow tretia
#http_access allow stvrta
#http_access allow piata
#http_access allow siesta
#http_access allow siedma
#http_access allow osma
#http_access allow deviata
#http_access allow desiata
#http_access allow jedenasta
# Zakaz pre vsetkych ostatnych mimo povolenych
http_access deny all
icp_access allow all
miss_access allow all
#cache_peer_access
#proxy_auth_realm Squid proxy-caching web server
#ident_lookup_access deny all
# ADMINISTRATIVE PARAMETERS
cache_mgr root@spsslm.sk
cache_effective_user squid
cache_effective_group squid
visible_hostname proxy.spsslm.sk
#unique_hostname www-cache1.foo.org
#hostname_aliases
# OPTIONS FOR THE CACHE REGISTRATION SERVICE
#announce_period 1 day
#announce_host tracker.ircache.net
#announce_port 3131
# HTTPD-ACCELERATOR OPTIONS
#httpd_accel_host hostname
#httpd_accel_port port
#httpd_accel_with_proxy off
#httpd_accel_uses_host_header off
# MISCELLANEOUS
#dns_testnames netscape.com internic.net nlanr.net microsoft.com
#logfile_rotate 0
#append_domain .yourdomain.com
#tcp_recv_bufsize 0 bytes
#err_html_text
memory_pools off
forwarded_for off
#log_icp_queries on #icp_hit_stale off
#minimum_direct_hops 4
#cachemgr_passwd secret shutdown
#cachemgr_passwd disable all
store_avg_object_size 13 KB
#store_objects_per_bucket 50
client_db off
#netdb_low 900
#netdb_high 1000
#netdb_ping_period 5 minutes
#query_icmp off
#test_reachability off
#buffered_logs off
#reload_into_ims off
#anonymize_headers
#fake_user_agent none
#error_directory /etc/squid/errors
error_directory /usr/lib/squid/errors/Slovak
#minimum_retry_timeout 5 seconds
#maximum_single_addr_tries 3
#snmp_port 3401
#snmp_access allow snmppublic localhost
#snmp_incoming_address 0.0.0.0
#snmp_outgoing_address 0.0.0.0
#wccp_router 0.0.0.0
#wccp_version 4
#wccp_incoming_address 0.0.0.0
#wccp_outgoing_address 0.0.0.0
# DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
#delay_pools 0
#delay_access 1 deny all
#delay_parameters pool aggregate network individual
#delay_parameters 2 32000/32000 8000/8000 600/64000
#delay_initial_bucket_level 50
#incoming_icp_average 6
#incoming_http_average 4
#min_icp_poll_cnt 8
#min_http_poll_cnt 8
#uri_whitespace strip
#acl buggy_server url_regex ^http://....
#broken_posts allow buggy_server
#prefer_direct on
#strip_query_terms on
#ignore_unknown_nameservers on
#digest_generation on
#digest_bits_per_entry 5
#digest_rebuild_period 1 hour
#digest_rewrite_period 1 hour
#digest_swapout_chunk_size 4096 bytes
#digest_rebuild_chunk_percentage 10
#client_persistent_connections on
#server_persistent_connections on
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |