> 1) why is it so slow ? "top" shows me much higher CPU usage when using > squidGuard with the same set of regexp patterns as I use with adzap ?? > adzap is Perl based, so I guess it shouldn't be any faster.
>From <http://www.squidguard.org/config/#Expressionlists>: ---------------------- "While the size of the domain and urllists only has marginal influence on the performance, too many large or complex expressions will quickly degrade the performance of squidGuard. Though it may depend heavily on the performance of the regex library you link with." ---------------------- > What is db3 support for squidGuard ? >From <http://www.squidguard.org/doc/>: What makes squidGuard so fast and robust? ---------------------- The efficiency is achieved by: - storing all lists in B-trees. <<<<------ - compiling/optimizing all regular expressions at startup. - source code in C. - using custom-made string comparators where regular expression match would be an overkill. - using a cursor to check the previous key in B-trees to speed up substring matching. - chosing the more efficient system libraries/calls where there are alternatives. - breaking out from the rule checking loops as son as a decision can be made. - avoiding constant evaluation of the rule's time space validity by using valid/disabled flags. At startup the initial state of the time dependent rules are evaluated and an alarm is set for the first moment of change. When the alarm goes off squidGuard reevaluates all its time dependent rules and sets a new alarm, etc. etc. ---------------------- > Anyway, how can I improve performance of squidGuard + > numerous regexp patterns (which are converted from adzap). >From <http://www.squidguard.org/config/>: ---------------------- Tuning hints For optimal performance try: - limiting both the number of regular expressions and their complexity. Use domainlists and/or urllists where possible. - limiting the number of rewrite rules. Use redirectors where possible. - limiting the number of useless url list entries. Move the domainnames to the domainlist and remove redundant urllist entries where aplicable. - using ip addressranges rather than long lists of single ip addresses. If possible try grouping different usergroups into different ranges or subnets (virtual or physical). ---------------------- > -----Original Message----- > From: ���� ������� [mailto:ilia@;chel.skbkontur.ru] > Sent: Thursday, November 14, 2002 1:42 AM > To: Rick Matthews > Cc: Squidguard@Squidguard. Org > Subject: RE: migrating from adzap to squidguard > > > Salut, Rick Matthews ! > > On Tue, 12 Nov 2002, Rick Matthews wrote: > > > > 2) is it possible to redirect/rewrite the above ad1...adn, and to pass > > > everything by default. > > > I want to > > > a) pass ruleset which I explicitly specified > > > > The acl as listed below is: ' pass ok !ad1 !ad2 ... !adn all' and is processed left > > to right until either access is specifically granted or all possibilities are >exhausted. > > > > Here's how 'pass ok !ad1 !ad2 ... !adn all' is processed: > > > > <ok> - Any url that matches the regexp contained in the destination group ok is > > explicitly allowed access. Processing ends, and approval is returned. > > > > <ad1> - If url matches the regexp in ad1, processing ends and the associated >redirect > > is returned. Processing continues if url does not match the regexp in ad1. > > > > <ad2> - If url matches the regexp in ad2, processing ends and the associated >redirect > > is returned. Processing continues if url does not match the regexp in ad2. > > > > <adn> - If url matches the regexp in adn, processing ends and the associated >redirect > > is returned. Processing continues if url does not match the regexp in adn. > > > > <all> - An approval is returned for all urls that reach this point. > > yes, I tried that configuration. it works. I also wrote a script which > converts adzap patterns into squidGuard patterns. > > yes, it does cuts off the ad in the same way as adzap does. > > but... > > 1) why is it so slow ? "top" shows me much higher CPU usage when using > squidGuard with the same set of regexp patterns as I use with adzap ?? > adzap is Perl based, so I guess it shouldn't be any faster. > > What is db3 support for squidGuard ? for now I simply list all the > converted regexp patterns "as is". I used to use regexp in C, they need to > be "compiled". Anyway, how can I improve performance of squidGuard + > numerous regexp patterns (which are converted from adzap). > > It does work fast enough with adzap, so I guess it could be even faster > with squidGuard... > > > > > The rewrite group can rewrite all or part of the url based upon regular >expressions. Rewrite > > groups are completely defined within the squidGuard.conf file; they do not point >to a database. > > I wonder why there's no such tool within squid itself. There's mod_rewrite > for apache. And there's could be such ability in squid. It could be even > better, in such circumstances I can even assign "URL rewriting" on some > squid native ACLs, which could be very-very-very-very nice thign to have. > > > > > 'pass all' and 'pass none' are explained above. > > > > The config file that I sent to you contains only the default acl, because you >specifically said that > > you "don't need any source/time/username filtering". > > yes, I tried it. thank You. it works. "yet a bit slow", but I hope to > accelerate it soon. > > > > > Rick Matthews > > > > > Regards, (��������� ���������) > Ilia Chipitsine (���� �������) > > >
