Search squid archive

Re: High cpu usage by re_search_internal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/10/2014 3:34 a.m., Omid Kosari wrote:
> Mehdi Sarmadi wrote
>> Hey
>> 
>> Alright. About refresh pattern you have a very excessive list
>> IMHO. I don't know about your hardware but generally for a
>> typical general purpose SMB server hardware, that's too much. If
>> you want to stick with it and can't reduce the list. Check, how
>> many core's you machine have. You should know squid naturally 
>> sticks . A solution is to start multiple squid instances, that
>> way you can have squid(refresh_pattern) load distributed on more
>> than one CPU core, thus you'll get better performance.
>> 
>> Hope it helps Cheers
> 
> Thanks for the tip . It has a core i3 cpu so it has 4 cores .
> Unfortunately squid does not load fine across all cores specially
> in older versions like mine v 3.1 . Multi instance has its  own
> complexity and headaches . i am trying to have clean design to be
> away from those problems . It was very useful if squid could do the
> refresh_pattern jobs by other cores . or some trick like that .
> 

Here are some tips for your patterns:

* all the (.+\.)? at the begining are useless complication. Remove.

* so are the .*?$ at the end of some patterns. This bit is also
probably doing more harm than good. Because the $ hints to regex that
it should scan right-to-left and the path and query portions of the
URL is the largest pieces to scan over. Remove.

* the following two lines are redundant. The first will match
everything the second would have caught. Drop the second one.

  refresh_pattern -i \.htm 120 50% 10080 reload-into-ims
  refresh_pattern -i \.html 120 50% 10080 reload-into-ims

* the pattern below the comment "#Very aggressive 120 Days" contains
duplicates.


there are probably some smaller fixes, but those are the biggest I can
see without suggesting you drop those patterns entirely.

You would do well from an upgrade of Squid. The later versions have
eliminated the need for ignore-no-cache, ignore-private, ignore-auth
(the latter two there do really, really bad things).

I am also curios why you are ignoring must-revalidate? it is a
bandwidth reduction mechanism.

Amos
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUMA5PAAoJELJo5wb/XPRjkbwIAJtwCUvi1NYfg6dkggRth902
MG/x9mzhEVGE7Js7EyctD01Rgte/DUO3WIkbEBAkVK1t3Qlb1D8r60axtKBZzbd1
TsJ+kiJP4MB6C48yPwZlTe3/XwacgrF62UtocGNfJEHjm+9ZnyQL6EhAMJFJAHdM
6kJg35/AuThbEKrfTOG0u4BuMd0bnvNb1VHAOiRoaBAWDcW0N3uK3vrMM0XT5teA
J5ht0GaLQoum/YesgwEf84emqD0Ukv4SZSj73w1fO4B4lEEC6aQ2IkOHycYp/fCh
tLPeMekwZa4aQxLjgVJNEZHhcen91ttZPyLQUByZFhMShAJCJsRpQwpVpiHt/ug=
=SEQ1
-----END PGP SIGNATURE-----
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux