netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* getaddrinfo - too many recvmsg calls
@ 2009-07-20  7:05 Zsolt SZALAI
  2009-07-20  7:14 ` Rémi Denis-Courmont
  0 siblings, 1 reply; 3+ messages in thread
From: Zsolt SZALAI @ 2009-07-20  7:05 UTC (permalink / raw)
  To: netdev

Hi!

I'm working with a host that contains sometimes thousands of virtual
ip address.
One of our third-party application calls getaddrinfo for
sanity-checking the given IP.
I've noticed that recvmsg calls inside getaddrinfo are proportioned to
the number of VIPs, causing high system load and "hanging" user
experience when there are lots of VIPs and also the sanitychecks may
have to happen 2-5 times in a second.

The sanitycheck is now really simple, just a
    addrinfo hints = { 0, AF_INET, 0, 0, 0, NULL, NULL, NULL };
    int result = getaddrinfo(ipAddress, NULL, &hints, &addresses);
call.

I've also noticed that when the vips are configured with `ip` and not
with `ifconfig`, the number of recvmsg calls drops down by a 0.5
multiplier.

Could you advise some other method or optimized execution for this
checks for the environment described?
Or should it be just skipped?

Thanks,
Zsolt Szalai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-20  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20  7:05 getaddrinfo - too many recvmsg calls Zsolt SZALAI
2009-07-20  7:14 ` Rémi Denis-Courmont
2009-07-20  7:55   ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).