|
stalls with concurrent host name resolvers: msg#00009lib.boost.asio.user
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
------------------------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | Re: handling disk IO within asio programs: 00009, Christopher Kohlhoff |
|---|---|
| Next by Date: | Re: stalls with concurrent host name resolvers: 00009, Christopher Kohlhoff |
| Previous by Thread: | parse error wit GCC in epoll_reactor.hpp and kqueue_reactor.hppi: 00009, Arvid Norberg |
| Next by Thread: | Re: stalls with concurrent host name resolvers: 00009, Christopher Kohlhoff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |