logo       

stalls with concurrent host name resolvers: msg#00009

lib.boost.asio.user

Subject: stalls with concurrent host name resolvers

Hi,

I discovered that if I have many (say, 50) io_services, and all of them perform a name
lookup at (more or less) the same time, some of the handlers will stall for about 1 minute. Initially I thought the handlers were never called. All host name resolvers resolves the same host name, so only the first one should stall (assuming the OS caches host names).

I haven't looked deeper into this, but I did write a small program that reproduces the problem (on darwin), see attached.

I realize that this is a very strange use case, since you would normally just use a few io_services. The reason I do this is because I simulate my component in a bigger network on a single machine, in a single process. Each instance then has its own io_service object.

Anyway, this is the output I get:

$time ./bin/darwin-3.3/debug/link-static/test
all threads started

real 1m0.225s
user 0m0.123s
sys 0m0.105s

Increasing the number of threads does not seem to influence the time it takes for the stalled lookups.

Maybe this is just an OS issue.

thanks.
--
Arvid Norberg

Attachment: asio_resolver.cpp
Description: Binary data


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
asio-users mailing list
asio-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/asio-users
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise