分类: BSD
2008-02-01 02:01:45
########## HP company had the squid for a detailed testing. Refer to the documents, I made a school abroad Acting adjusted accordingly. Default cache_replacement_policy and memory_replacement_policy are LRU. The algorithm used in cache efficiency is relatively low. After the actual testing, the use of LFUDA (Least Frequently Used with Dynamic Aging) as a cache replacement policy, the cache hit rate highest. Use heap LRU as a memory replacement policy, the maximum memory cache hit rate. Measurement tools to include the use of overseas agents, the use of agency users, Chinanet bandwidth exports reached 5-7 M, has been much higher than the actual bandwidth M 4. Cache indeed played a role. I export to the relatively large bandwidth ((60M Campus Network) telecommunications (10 M) (with a)) I do not know how settings are and the above article suggests matching. ############## |
# less /usr/local/etc/squid/squid.conf |more # Do not edit manually! http_port 192.168.1.253:80 http_port 127.0.0.1:80 transparent icp_port 0 pid_filename /var/run/squid.pid cache_effective_user proxy cache_effective_group proxy error_directory /usr/local/etc/squid/errors/English visible_hostname localhost cache_mgr sniperpr@gmail.com access_log /var/squid/log/access.log cache_log /var/squid/log/cache.log cache_store_log none shutdown_lifetime 3 seconds # Allow local network(s) on interface(s) acl localnet src 192.168.1.0/255.255.255.0 uri_whitespace strip cache_dir [color=red]diskd[/color] /var/squid/cache 150000 16 256 cache_mem 16 MB maximum_object_size 4096 KB minimum_object_size 0 KB [color=yellow]cache_replacement_policy heap[/color] [color=red]LFUDA[/color] [color=yellow]memory_replacement_policy[/color] [color=red]heap GDSF[/color] offline_mode off # No redirector configured # Setup some default acls acl all src 0.0.0.0/0 acl localhost src 127.0.0.1 acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 443 1025-65535 acl sslports port 443 563 443 acl manager proto cache_object acl purge method PURGE acl connect method CONNECT acl dynamic urlpath_regex cgi-bin \? cache deny dynamic http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny purge http_access deny !safeports http_access deny CONNECT !sslports # Always allow localhost connections http_access allow localhost request_body_max_size 0 KB reply_body_max_size 0 allow all delay_pools 1 delay_class 1 2 delay_parameters 1 -1/-1 -1/-1 delay_initial_bucket_level 100 delay_access 1 allow all # Allow local network(s) on interface(s) http_access allow localnet # Custom options [color=red]cache_swap_low 85[/color] cache_swap_high 99 # Default block all to be sure http_access deny all |
Squid Cache: Version 2.6.STABLE5 configure options: '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin' '--datadir=/usr/local/etc/squid' '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/usr/local/squid' '--sysconfdir=/usr/local/etc/squid' '--enable-removal-policies=lru heap' '--disable-linux-netfilter' '--disable-linux-tproxy' '--disable-epoll' '--enable-auth=basic ntlm digest' '--enable-basic-auth-helpers=NCSA PAM MSNT SMB LDAP YP' '--enable-digest-auth-helpers=password ldap' '--enable-external-acl-helpers=ip_user session unix_group wbinfo_group ldap_group' '--enable-ntlm-auth-helpers=SMB' '--enable-storeio=ufs [color=red]diskd[/color] null' '--enable-delay-pools' '--enable-ssl' '--with-openssl=/usr' '--enable-wccpv2' '--enable-pf-transparent' '--enable-kqueue' '--enable-err-languages=Azerbaijani Bulgarian Catalan Czech Danish Dutch English Estonian Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Lithuanian Polish Portuguese Romanian Russian-1251 Russian-koi8-r Serbian Simplify_Chinese Slovak Spanish Swedish Traditional_Chinese Turkish' '--enable-default-err-language=English' '--prefix=/usr/local' 'i386-portbld-freebsd6.1' 'LDFLAGS= -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib' 'CFLAGS=-O2 -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include' 'CPPFLAGS=' 'host_alias=i386-portbld-freebsd6.1' 'build_alias=i386-portbld-freebsd6.1' 'target_alias=i386-portbld-freebsd6.1' 'CC=cc' |
|