blubbersuelze
09.10.14, 01:10
Hallo zusammen,
ich habe unter Debian7 (Wheezy) einen Squid3 am laufen,
er funktioniert soweit auch jedoch scheint er herunter geladene Objekte nicht aus dem Cache zu holen,
oder er gibt diese nur mit Internetgeschwindigkeit (~1,5MB/s) weiter.
Das ist besonders bei großen Dateien ärgerlich, v.a. da ich hier überall Gigabit Netzwerk liegen habe.
Beispiel:
Ich lade das aktuelle Iso-Image von Debian herunter ~ 800kB/s.
Nun warte ich eine Minute und lade es vom gleichen Rechner noch einmal, sprich ich nutze den gleichen Link
und statt der erwarteten Netzwerkgeschwindigkeit habe ich wieder ~800kB/s.
Vielleicht weiß ja jemand was ich an in der squid.conf anpassen muss das das wie erwartet funktioniert.
squid.conf:
cache_mem 2048 MB
cache_swap_low 90
cache_swap_high 95
#cache_dir pfad_des_cache <Cachegrösse in MB> <Verzeichnisse> <Unterverzeichnisse>
cache_dir diskd /PROXYCACHE 8000 16 256
error_directory /usr/share/squid3/errors/de-de
minimum_object_size 0 MB
maximum_object_size 1536 MB
request_body_max_size 0MB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
quick_abort_min 0KB
quick_abort_max 0KB
quick_abort_pct 100
negative_ttl 2 second
negative_dns_ttl 2 second
positive_dns_ttl 240 hours
range_offset_limit 0 KB
fqdncache_size 16384
maximum_object_size_in_memory 4096 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LRU
emulate_httpd_log off
log_fqdn off
client_db off
log_icp_queries off
buffered_logs on
half_closed_clients off
coredump_dir /PROXYCACHE
pipeline_prefetch on
offline_mode off
reload_into_ims on
#30 -> 30 Min
#120 -> 1 Stunde
#1440 -> 1 Tag
#4320 -> 3 Tage
#10080 -> 7 Tage
#43200 -> 30 Tage
refresh_pattern -i ^ftp: 1440 20% 10080 reload-into-ims
refresh_pattern -i .(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims refresh-ims ignore-no-cache ignore-private
refresh_pattern -i .(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|g z|tgz|rar|bin|7z|doc?|xls?|ppt?|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i .(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
vary_ignore_expire on
memory_pools on
max_filedescriptors 65536
retry_on_error on
via off
httpd_suppress_version_string on
visible_hostname router.at.home
ftp_user user@mypc.workgroup
ftp_passive on
http_port 192.168.1.1:8080 transparent
access_log /dev/null
cache_log /dev/null
cache_store_log none
logfile_rotate 2
forwarded_for off
pid_filename /var/run/squid3.pid
dns_nameservers 127.0.0.1
hosts_file none
follow_x_forwarded_for deny all
acl NETZWERK src 192.168.1.0/24
acl to_NETZWERK dst 192.168.1.0/24
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl manager proto cache_object
acl CONNECT method CONNECT
cache deny to_NETZWERK
http_access allow manager localhost
http_access allow localhost
http_access allow NETZWERK
http_access deny all
acl apache rep_header Server ^Apacheacl apache rep_header Server ^Apache
acl QUERY urlpath_regex -i cgi-bin .php$ .asp$ .shtml$ .cfm$ .cfml$ .phtml$ .php3$ localhost
cache deny QUERY
danke für alle Tips und Tricks :-)
mfg.
blubbersuelze :p
ich habe unter Debian7 (Wheezy) einen Squid3 am laufen,
er funktioniert soweit auch jedoch scheint er herunter geladene Objekte nicht aus dem Cache zu holen,
oder er gibt diese nur mit Internetgeschwindigkeit (~1,5MB/s) weiter.
Das ist besonders bei großen Dateien ärgerlich, v.a. da ich hier überall Gigabit Netzwerk liegen habe.
Beispiel:
Ich lade das aktuelle Iso-Image von Debian herunter ~ 800kB/s.
Nun warte ich eine Minute und lade es vom gleichen Rechner noch einmal, sprich ich nutze den gleichen Link
und statt der erwarteten Netzwerkgeschwindigkeit habe ich wieder ~800kB/s.
Vielleicht weiß ja jemand was ich an in der squid.conf anpassen muss das das wie erwartet funktioniert.
squid.conf:
cache_mem 2048 MB
cache_swap_low 90
cache_swap_high 95
#cache_dir pfad_des_cache <Cachegrösse in MB> <Verzeichnisse> <Unterverzeichnisse>
cache_dir diskd /PROXYCACHE 8000 16 256
error_directory /usr/share/squid3/errors/de-de
minimum_object_size 0 MB
maximum_object_size 1536 MB
request_body_max_size 0MB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
quick_abort_min 0KB
quick_abort_max 0KB
quick_abort_pct 100
negative_ttl 2 second
negative_dns_ttl 2 second
positive_dns_ttl 240 hours
range_offset_limit 0 KB
fqdncache_size 16384
maximum_object_size_in_memory 4096 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LRU
emulate_httpd_log off
log_fqdn off
client_db off
log_icp_queries off
buffered_logs on
half_closed_clients off
coredump_dir /PROXYCACHE
pipeline_prefetch on
offline_mode off
reload_into_ims on
#30 -> 30 Min
#120 -> 1 Stunde
#1440 -> 1 Tag
#4320 -> 3 Tage
#10080 -> 7 Tage
#43200 -> 30 Tage
refresh_pattern -i ^ftp: 1440 20% 10080 reload-into-ims
refresh_pattern -i .(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims refresh-ims ignore-no-cache ignore-private
refresh_pattern -i .(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|g z|tgz|rar|bin|7z|doc?|xls?|ppt?|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i .(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
vary_ignore_expire on
memory_pools on
max_filedescriptors 65536
retry_on_error on
via off
httpd_suppress_version_string on
visible_hostname router.at.home
ftp_user user@mypc.workgroup
ftp_passive on
http_port 192.168.1.1:8080 transparent
access_log /dev/null
cache_log /dev/null
cache_store_log none
logfile_rotate 2
forwarded_for off
pid_filename /var/run/squid3.pid
dns_nameservers 127.0.0.1
hosts_file none
follow_x_forwarded_for deny all
acl NETZWERK src 192.168.1.0/24
acl to_NETZWERK dst 192.168.1.0/24
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl manager proto cache_object
acl CONNECT method CONNECT
cache deny to_NETZWERK
http_access allow manager localhost
http_access allow localhost
http_access allow NETZWERK
http_access deny all
acl apache rep_header Server ^Apacheacl apache rep_header Server ^Apache
acl QUERY urlpath_regex -i cgi-bin .php$ .asp$ .shtml$ .cfm$ .cfml$ .phtml$ .php3$ localhost
cache deny QUERY
danke für alle Tips und Tricks :-)
mfg.
blubbersuelze :p