[squid-users] SMP mode, workers, cache_dir with conditional

juju juju192 at yahoo.fr
Wed Oct 10 14:01:09 UTC 2018


Hello,Sorry if this question has already been posted ( I can't check as the "Search Function" is currently not working )I'm running squid-3.5.20 on Amazon Linux 2018.03. 2 cores with 8 GBMy squid is currently working but only on 1 core.I which to use the 2 cores. I understood that I have to use workers in squid.conf with separate cache directory. So I modified default  squid.conf  with :--- [root at JujuServerTest2 ~]# egrep -v "^#|^$" /etc/squid/squid.confacl localnet src 10.0.0.0/8     # RFC1918 possible internal networkacl localnet src 172.16.0.0/12  # RFC1918 possible internal networkacl localnet src 192.168.0.0/16 # RFC1918 possible internal networkacl localnet src fc00::/7       # RFC 4193 local private network rangeacl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machinesacl SSL_ports port 443acl Safe_ports port 80          # httpacl Safe_ports port 21          # ftpacl Safe_ports port 443         # httpsacl Safe_ports port 70          # gopheracl Safe_ports port 210         # waisacl Safe_ports port 1025-65535  # unregistered portsacl Safe_ports port 280         # http-mgmtacl Safe_ports port 488         # gss-httpacl Safe_ports port 591         # filemakeracl Safe_ports port 777         # multiling httpacl CONNECT method CONNECThttp_access deny !Safe_portshttp_access deny CONNECT !SSL_portshttp_access allow localhost managerhttp_access deny managerhttp_access allow localnethttp_access allow localhosthttp_access deny allhttp_port 3128workers 2if ${process_number} = 1cache_dir rock /var/spool/squid1 1024endifif ${process_number} = 2cache_dir rock /var/spool/squid2 1024endifcoredump_dir /var/spool/squidrefresh_pattern ^ftp:           1440    20%     10080refresh_pattern ^gopher:        1440    0%      1440refresh_pattern -i (/cgi-bin/|\?) 0     0%      0refresh_pattern .               0       20%     4320[root at JujuServerTest2 ~]#
---but/var/log/squid/squid.out :
[...]2018/10/10 13:52:15 kid2| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid2| Creating missing swap directories2018/10/10 13:52:15 kid1| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid1| Creating missing swap directories2018/10/10 13:52:15 kid3| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid3| Creating missing swap directories2018/10/10 13:52:15 kid3| No cache_dir stores are configured.2018/10/10 13:52:15 kid3| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid2| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid1| Set Current Directory to /var/spool/squid2018/10/10 13:52:15 kid2| Creating missing swap directories2018/10/10 13:52:15 kid1| Creating missing swap directories2018/10/10 13:52:15 kid3| Creating missing swap directories2018/10/10 13:52:15 kid3| No cache_dir stores are configured    <---------ps faux |grep squidroot      4172  0.0  0.1 110512  2012 pts/1    S+   14:00   0:00                          \_ grep --color=auto squidroot      4133  0.0  0.6 346844  6848 ?        Ss   13:52   0:00 squid -f /etc/squid/squid.confsquid     4136  0.0  2.1 359828 21292 ?        S    13:52   0:00  \_ (squid-coord-3) -f /etc/squid/squid.confsquid     4140  0.0  0.1  28004  1892 ?        S    13:52   0:00      \_ (logfile-daemon) /var/log/squid/access.log


Looks like, my configuration is not good because "No cache_dir stores are configured"Coud you tell me where is my mistake ? 
Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20181010/05e476db/attachment-0001.html>


More information about the squid-users mailing list