<div dir="ltr"><div>Hi Amos, <br><br> cache_mem 0<br>
cache deny all <br><br></div><div>already there.<br></div><div>Regarding number of nic ports we have 4 10G eth cards 2 in each bonding interface.<br><br></div><div>Well, entire config would be way too long but here is the static part:<br>via off<br>cpu_affinity_map process_numbers=1 cores=2<br>forwarded_for delete<br>visible_hostname squid1<br>pid_filename /var/run/squid1.pid<br>icp_port 0<br>htcp_port 0<br>icp_access deny all<br>htcp_access deny all<br>snmp_port 0<br>snmp_access deny all<br>dns_nameservers x.x.x.x<br>cache_mem 0<br>cache deny all<br>pipeline_prefetch on<br>memory_pools off<br>maximum_object_size 16 KB<br>maximum_object_size_in_memory 16 KB<br>ipcache_size 0<br>cache_store_log none<br>half_closed_clients off<br>include /etc/squid/rules<br>access_log /var/log/squid/squid1-access.log<br>cache_log /var/log/squid/squid1-cache.log<br>coredump_dir /var/spool/squid/squid1<br>refresh_pattern ^ftp: 1440 20% 10080<br>refresh_pattern ^gopher: 1440 0% 1440<br>refresh_pattern -i (/cgi-bin/|\?) 0 0% 0<br>refresh_pattern . 0 20% 4320<br><br>acl port0 myport 30000<br>http_access allow testhost<br>tcp_outgoing_address x.x.x.x port0<br><br></div><div>include is there for basic ACL - safe ports and so on - to minimize config file footprint since it's static and same for every worker.<br></div><div><br></div><div>and so on 44 more times in this config file<br><br></div><div>Do you know of any good article hot to tune kernel locking or have any idea why is it happening? <br></div><div>I cannot find any good info on it and all I've found are bits and peaces of kernel source code.<br><br><br></div><div>Tnx.<br></div><div>J.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-31 0:42 GMT+02:00 Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 31/07/2015 8:05 a.m., Josip Makarevic wrote:<br>
> Hi,<br>
><br>
> I have a problem with squid setup (squid version 3.5.6, built from source,<br>
> centos 6.6)<br>
> I've tried 2 options:<br>
> 1. SMP<br>
> 2. NON-SMP<br>
><br>
> I've decided to stick with custom build non-smp version and the thing is:<br>
> - i don't need cache - any kind of it<br>
<br>
</span> cache_mem 0<br>
cache deny all<br>
<br>
That is it. All other caches used by Squid *are* mandatory for good<br>
performance. And are only used anyway when the component that needs them<br>
is actively used.<br>
<span class=""><br>
<br>
> - I have DNS cache just for that<br>
> - squid has to listen on 1024 ports on 23 instances.<br>
> each instance listens on set of ports and each port has different outgoing<br>
> ip address.<br>
<br>
</span>And how many NIC do you have that spread over?<br>
<span class=""><br>
><br>
> The thing is this:<br>
> It's alll good until we hit it with more than 150mbits then...<br>
><br>
> (output from perf top)<br>
> 84.57% [kernel] [k] osq_lock<br>
> 4.62% [kernel] [k] mutex_spin_on_owner<br>
> 1.41% [kernel] [k] memcpy<br>
> 0.79% [kernel] [k] inet_dump_ifaddr<br>
> 0.62% [kernel] [k] memset<br>
><br>
> 21:53:39 up 7 days, 10:38, 1 user, load average: 24.01, 23.84, 23.33<br>
> (yes, we have 24 cores)<br>
> Same behavior is with SMP and NON-SMP setup (SMP setup is all in one file<br>
> with workers 23 option but then I have to use rock cache)<br>
><br>
> so, my question is....what...how to optimize this.....whatever....I'm stuck<br>
> for days, I've tried many sysctl options but none of them works.<br>
> Any help, info, something else?<br>
<br>
</span>None of those are Squid functionality. If you want help optimizing your<br>
config and are willing to post it to the list I am happy to do a quick<br>
audit and point out any problem areas for you.<br>
<br>
But tuning the internal locking code of the kernel is way off topic.<br>
<br>
Amos<br>
<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div><br></div>