SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm currently doing some maintenance in a network with Slackware64 14.1 on the server and Slackware 14.1 on all desktop clients. Among other things, the server is running Squid as caching and filtering proxy. The cache is configured to only use the server's RAM (maximum 1 GB) without writing anything to disk.
The Internet connection is not very fast here. When I'm running slackpkg upgrade-all on several desktop clients, some packages seem to be kept in Squid's cache, judging from the very fast download speed. On the other hand, bigger packages don't seem to be kept in the cache and are re-downloaded from the package mirror.
Is there a way to configure Squid so it also keeps bigger files in the cache? Here's my local server's squid.conf file:
Code:
# /etc/squid/squid.conf
# Nom d'hôte du serveur Squid
visible_hostname niklabox.scholae.lan
# Définitions
acl localnet src 192.168.2.0/24 # Réseau local
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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 CONNECT method CONNECT
# Règles d'accès
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
# Port du proxy
http_port 3128 transparent
# Taille du cache dans la RAM
cache_mem 1024 MB
# Emplacement et taille du cache sur le disque
# cache_dir ufs /var/cache/squid 256 16 256
# cache_dir ufs /var/cache/squid 4096 16 256
# Fichier PID
pid_filename /var/run/squid/squid.pid
# Vidage système
coredump_dir /var/log/squid/cache/squid
# Durée de vie des fichiers sans date d'expiration
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
# SquidGuard
url_rewrite_program /usr/bin/squidGuard -c /etc/squidguard/squidguard.conf
url_rewrite_children 5
At the risk of insulting your intelligence (and I know you're a smart fellow ...:-), why are you only you using a memory cache ? Surely the solution is to use a disk cache of (say ) 10 GB !
squid config processing is a bit buggy (or at least I found it annoying), hard to configure cache sizes.
see cache_mem, maximum_object_size_in_memory and other size related config parameters (like cache_dir, maximum_object_size).
At the risk of insulting your intelligence (and I know you're a smart fellow ...:-), why are you only you using a memory cache ? Surely the solution is to use a disk cache of (say ) 10 GB !
I'm doing this for two reasons.
Cache operations to and from RAM are sensibly faster.
With approximately 100 simultaneous user connections, disks would be working constantly, so this is to reduce disk operation.
squid config processing is a bit buggy (or at least I found it annoying), hard to configure cache sizes.
see cache_mem, maximum_object_size_in_memory and other size related config parameters (like cache_dir, maximum_object_size).
These look like the parameters I have to edit. I'll give it a try tomorrow. Thanks!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.