www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject getaddrinfo performance
Date Tue, 20 Aug 2002 17:46:24 GMT
I'm doing some profiling of mod_proxy configured as a gateway (aka reverse
proxy) on AIX. Over 50% of the cycles to handle a request are chewed up in
getaddrinfo() (getaddrinfo is doing memsets on big chunks of storage among
other things).

Here is the call in ap_proxy_http_determine_connection() that wrappers

err = apr_sockaddr_info_get(&uri_addr, apr_pstrdup(c->pool, uri->hostname),
                                APR_UNSPEC, uri->port, 0, c->pool);

Changing APR_UNSPEC to APR_INET nearly doubles the throughput (140 rps to
265 rps). Replacing getaddrinfo with gethostbyname_r will get the benchmark
to 280 rps. Allan Edwards is reporting significant performance hit on
Windows as well (though not as severe as I'm seeing on AIX).  Looks like we
may need a config directive to tell the server to use AF_INET or AF_INETV6.


View raw message