Re: [squid-users] squid consuming too much processor/cpu

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 22 Mar 2010 19:27:06 +1300

Muhammad Sharfuddin wrote:
> On Fri, 2010-03-19 at 09:24 +0100, Matus UHLAR - fantomas wrote:
>>>> On Wed, 2010-03-17 at 19:54 +1100, Ivan . wrote:
>>>>> you might want to check out this thread
>>>>>
>>>>> http://www.mail-archive.com/squid-users@squid-cache.org/msg56216.html
>>> On Wed, Mar 17, 2010 at 11:09 PM, Muhammad Sharfuddin
>>> <m.sharfuddin_at_nds.com.pk> wrote:
>>>> I checked, but its not clear to me
>>>> do I need to install some packages/rpms ? and then ?
>>>> I mean how can I resolve this issue
>> On 18.03.10 08:46, Ivan . wrote:
>>> run a cron job to restart Squid once a week?
>> or simply not using tons ov regular expressions within squid access lists
>> and leave the job to external program(s).
>
> Thanks list for help.
>
> restarting squid is not a solution, I noticed only after 20 minutes
> after restarting, squid started consuming/eating CPU again.
>
> On Wed, 2010-03-17 at 19:54 +1100, Ivan . wrote:
>> you might want to check out this thread
>> http://www.mail-archive.com/squid-users@squid-cache.org/msg56216.html
> Neither I installed any package.. i.e not checked
>
> On Wed, 2010-03-17 at 05:27 -0700, George Herbert wrote:
>> or install the Google malloc library and recompile Squid to
>> use it instead of default gcc malloc.
>
> On Wed, 2010-03-17 at 15:01 +0200, Henrik K wrote:
>> If the system regex is issue, wouldn't it be better/simpler to just
>> compile
>> with PCRE? (LDFLAGS="-lpcreposix -lpcre"). It doesn't leak and as a bonus
>> makes your REs faster.
> Nor I re-compiled Squid, as I have to use binary/rpm version of squid
> that shipped with the Distro I am using
>
> issue resolved via removing acl that blocked almost 60K urls/domains
>
> commenting following worked
> ##acl porn_deny url_regex "/etc/squid/domains.deny"
> ##http_access deny porn_deny
>
> so how can I deny illegal contents/website ?
>

If those were actually domain names...
  * use "dstdomain" type instead of regex.
  * use wildcard sub-domans where possible: .example.com instead of
a.example.com plus b.example.com ...

Optimize order of ACLs so do most rejections as soon as possible with
fastest match types.

If you don't mind sharing your squid.conf access lines we can work
through optimizing with you.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE8 or 3.0.STABLE25
   Current Beta Squid 3.1.0.18
Received on Mon Mar 22 2010 - 06:27:17 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 22 2010 - 12:00:05 MDT