Re: Squid 3.2 performance question

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Fri, 23 Mar 2012 19:46:31 +0100

fre 2012-03-23 klockan 19:49 +0400 skrev Alexander Komyagin:

> It seems I finally figured out where the problem is. Squid 3.2.0.16
> performs host verification for each request. And this verification
> produces the call to libc getaddrinfo() function (converting IP address
> from text to numeric in my case), but uClibc implementation of this
> functions looks like not aware of AF_HOSTNUMERIC hint flag, thus
> performing full lookup (I haven't checked details yet). With RSBAC-Net
> turned on it's too much overhead. (Actually there are two calls for such
> conversion per request - one more is in url.cc:urlParseFinish()
> function)

Why is the overhead with RSBAC-Net that high in this case?

getaddrinfo() is a quite frequenty used call.

But I agree that getaddrinfo for converting textual ip to addrinfo to
compare with resolved hostname may be a bit overkill. Not even sure why
we are converting textual IP to to addrinfo there, we should already
have it in IpAddress internal representaion form.

> After adding a special hack for numeric IP address conversion requests
> in Squid (avoiding call to real getaddrinfo() in that case), the
> performance problem has gone (workers work fine too!).

Good!
Received on Fri Mar 23 2012 - 18:46:38 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 26 2012 - 12:00:10 MDT