David L Kensiski wrote:
> Are regular expression lookups optimized in pound? I.e are they put
> into a hash table of any sort, or are they scanned sequentially each
> time a new request comes in? I have a 4600 line config file with around
> 270 different "HeadRequire "Host:.*xyz.foo.com" matches and was
> wondering if I'd see a performance difference between the first and last
> entries.
Pound works on a first-match policy, so there would be some benefit to
putting your highest traffic sites towards the top. I don't think a
hash table would work here, since there's no way to specify a way to key
into that hash table given a particular header. I like where you're
going with the idea, I just don't think its supported.
Personally I haven't tried it, but I believe there's a benefit if pcre
is installed when building pound, as well as google's perftools.
Just looking over the archives a bit, I'm thinking I should really give
this a try, since people claim some wild performance gains!
Regards,
--
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/
|