<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Amos,<div class=""><br class=""></div><div class=""><blockquote type="cite" class="">Try adding this to your config file:<br class="">workers 2</blockquote><br class=""></div><div class="">I’ve added this directive. After a restart I don’t see squid-process listening on the tcp port 3128.</div><div class=""><div class=""><i class="">Active Internet connections (only servers)</i></div><div class=""><i class="">Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name</i></div><div class=""><i class="">tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      921/sshd</i></div><div class=""><i class="">tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1033/master</i></div><div class=""><i class="">tcp6       0      0 :::22                   :::*                    LISTEN      921/sshd</i></div><div class=""><i class="">tcp6       0      0 ::1:25                  :::*                    LISTEN      1033/master</i></div></div><div class=""><br class=""></div><div class="">/var/log/messages</div><div class=""><div class=""><i class="">squid[17362]: Squid Parent: will start 3 kids</i></div><div class=""><i class="">squid[17362]: Squid Parent: (squid-coord-3) process 17364 started</i></div><div class=""><i class="">squid[17362]: Squid Parent: (squid-2) process 17365 started</i></div><div class=""><i class="">squid[17362]: Squid Parent: (squid-1) process 17366 started</i></div><div class=""><i class="">systemd: Started Squid caching proxy.</i></div></div><div class=""><br class=""></div><div class="">What am I missing?</div><div class=""><br class=""></div><div class="">Abdelouahed</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Op 20 apr. 2015, om 02:58 heeft Amos Jeffries <<a href="mailto:squid3@treenet.co.nz" class="">squid3@treenet.co.nz</a>> het volgende geschreven:</div><br class="Apple-interchange-newline"><div class="">On 19/04/2015 9:58 p.m., Abdelouahed Haitoute wrote:<br class=""><blockquote type="cite" class="">Hello,<br class=""><br class="">I’ve got the following setup, each application on its own virtual machine:<br class=""><br class="">Client (sends http-requests to proxy)—> Squid (sends http-requests to apache based on destination IP and round robin to multiple apache machines) —> Apache (setting up a two way ssl to the requested server) —> HTTPS-server<br class=""><br class="">This setup works great, and I have the Apache and the HTTPS-server its performance tuned. Both can handle 2000 concurrent connections of file sizes up to 10MB.<br class=""><br class="">Unfortunately I haven’t been successful with the Squid-server. After a while I’m getting the following error messages in the log:<br class="">1429432828.200  62854 10.10.7.16 TCP_MISS_ABORTED/000 0 GET <a href="http://https.example.com/index.html" class="">http://https.example.com/index.html</a> - ROUNDROBIN_PARENT/192.168.0.20 -<br class=""><br class="">The Squid virtual machine contains the following:<br class="">CentOS 7.1 with latest updates<br class="">Squid Cache: Version 3.3.8<br class="">CPU: Intel Xeon E312xx (Sandy Bridge) - 1799.998 MHz (4 cores)<br class="">Memory: 4096 MiB<br class="">Harddisk: 10 GiB, SCSI, raw, cache none<br class=""><br class="">When I execute a performance test with 2000 concurrent connections handling a file size of 10KB on each request.<br class=""># ab -n 10000 -c 2000 -X 10.10.7.15:3128 <a href="http://https.example.com/index.html" class="">http://https.example.com/index.html</a><br class=""></blockquote><br class="">You are wrong. "ab -c 2000" to a non-caching proxy means *4000*<br class="">concurrent connections being handled by the proxy. Web server only loads<br class="">the file object once.<br class=""><br class="">A non-caching proxy requires +1 connection to server for each inbound<br class="">client connection ( 2000 + 2000 = 4K concurrent connections ).<br class=""><br class=""><br class=""><blockquote type="cite" class="">This is ApacheBench, Version 2.3 <$Revision: 1430300 $><br class="">Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/" class="">http://www.zeustech.net/</a><br class="">Licensed to The Apache Software Foundation, <a href="http://www.apache.org/" class="">http://www.apache.org/</a><br class=""><br class="">Benchmarking <a href="http://https.rinis.nl" class="">https.rinis.nl</a> [through 10.10.7.15:3128] (be patient)<br class="">Completed 1000 requests<br class="">Completed 2000 requests<br class="">Completed 3000 requests<br class="">Completed 4000 requests<br class="">Completed 5000 requests<br class="">Completed 6000 requests<br class="">Completed 7000 requests<br class="">Completed 8000 requests<br class="">apr_pollset_poll: The timeout specified has expired (70007)<br class=""></blockquote><br class="">Squid is still responding by the client has given up. As shown by the<br class="">_ABORTED in the squid log.<br class=""><br class=""><br class=""><blockquote type="cite" class="">Total of 8610 requests completed<br class=""><br class="">I have the command "vmstat 5” running on the squid server:<br class="">procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----<br class=""> r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st<br class=""> 2  0      0 3823916    764 124992    0    0   519    26  237  503  2  3 92  3  0<br class=""> 0  0      0 3823744    764 125072    0    0     0     0   44   79  0  0 100  0  0<br class=""> 0  0      0 3823776    764 125044    0    0     0     2   39   70  0  0 100  0  0<br class=""> 0  0      0 3729540    764 139116    0    0     1     0 2145  257  1  2 97  0  0<br class=""> 0  0      0 3728432    764 139888    0    0     0    46 2297  594  1  1 97  0  0<br class=""> 0  0      0 3726484    764 140892    0    0     0    39 2869  581  2  1 97  0  0<br class=""> 0  0      0 3725528    764 141376    0    0     0     0 2843  648  2  2 96  0  0<br class=""> 0  0      0 3724980    764 142008    0    0     0    69 2824  529  2  1 97  0  0<br class=""> 0  0      0 3724584    764 142540    0    0     0     0 2742  472  2  1 97  0  0<br class=""> 0  0      0 3723696    764 143004    0    0     0     0 2511  577  2  1 97  0  0<br class=""> 0  0      0 3722840    764 143200    0    0     0    12  884  228  1  1 99  0  0<br class=""> 0  0      0 3722704    764 142900    0    0     0     0  136  127  0  0 100  0  0<br class=""> 0  0      0 3722504    764 142744    0    0     0     0   40   70  0  0 100  0  0<br class=""> 0  0      0 3722456    764 142784    0    0     0   114   37   68  0  0 100  0  0<br class=""> 0  0      0 3722208    764 142832    0    0     0     0   41   68  0  0 100  0  0<br class=""> 0  0      0 3722480    764 142280    0    0     0     0  179   82  0  0 100  0  0<br class=""> 0  0      0 3722544    764 142140    0    0     0     7   41   75  0  0 100  0  0<br class="">procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----<br class=""> r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st<br class=""> 1  0      0 3722544    764 142136    0    0     0     0   36   67  0  0 100  0  0<br class=""> 0  0      0 3722996    764 141552    0    0     0     0   42   75  0  0 100  0  0<br class=""> 0  0      0 3722980    764 141568    0    0     0     0   37   68  0  0 100  0  0<br class=""> 0  0      0 3723028    764 141524    0    0     0     0   36   66  0  0 100  0  0<br class=""> 0  0      0 3736816    764 130352    0    0     0     0  809  114  0  0 99  0  0<br class=""> 0  0      0 3737544    764 130268    0    0     0    41   42   74  0  0 100  0  0<br class=""><br class="">It looks like the hardware has enough resources during the benchmark test.<br class=""><br class="">I’ve got the following squid.conf running:<br class="">cache_peer 192.168.0.18 parent 3128 0 round-robin no-query no-digest<br class="">cache_peer 192.168.0.20 parent 3128 0 round-robin no-query no-digest<br class=""><br class="">acl development_net dst 192.168.0.0/24<br class="">cache_peer_access 192.168.0.18 allow development_net<br class="">cache_peer_access 192.168.0.20 allow development_net<br class=""><br class="">never_direct allow all<br class="">cache deny all<br class=""><br class="">maximum_object_size_in_memory 16 MB<br class="">cache_mem 2048 MB<br class=""><br class="">The squid must not cache at all.<br class=""></blockquote><br class="">The dont bother setting cache_mem to 2GB. The memory cache wont be used.<br class=""><br class="">Also note that the lack of caching is *worsening* your performance<br class="">results. When memory cache is used the FD usage is halved, and the time<br class="">to respond is greatly increased (factor of approx 100 in latency reduction).<br class=""> Consider removing the "cache deny all" when you get this into<br class="">production. The 2GB memory cache you assigned can help a *lot* for quick<br class="">short term bursts of high traffic (ie. some DoS situations).<br class=""><br class=""><br class="">I do not see any SMP configuration in your Squid. Meaning that its<br class="">operating all those 4K connections with a single process on a single<br class="">1.7GHz core. Thats not much processor to work with.<br class=""><br class="">Try adding this to your config file:<br class=""> workers 2<br class=""><br class=""><br class="">Amos<br class=""><br class="">_______________________________________________<br class="">squid-users mailing list<br class=""><a href="mailto:squid-users@lists.squid-cache.org" class="">squid-users@lists.squid-cache.org</a><br class="">http://lists.squid-cache.org/listinfo/squid-users<br class=""></div></blockquote></div><br class=""></div></body></html>