Date: Fri, 15 Sep 2017 15:44:22 +0200 From: Polytropon <freebsd@edvax.de> To: RW <rwmaillists@googlemail.com> Cc: RW via freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Help scripting dns lookup using awk Message-ID: <20170915154422.98d639bd.freebsd@edvax.de> In-Reply-To: <20170915143019.2e02d386@gumby.homeunix.com> References: <59BB24E4.6060908@gmail.com> <20170915143019.2e02d386@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Sep 2017 14:30:19 +0100, RW via freebsd-questions wrote: > On Thu, 14 Sep 2017 20:55:00 -0400 > Ernie Luzar wrote: > > > The following sh script works, but runs very slow. > > Almost certainly the reason it's slow is that you are doing sequential > synchronous lookups. Switching to another language isn't going help > much. To speed it up you either need to switch to a language with a > DNS library that supports asynchronous lookups or fire-off parallel > child processes. The latter is easier. Correct. The bottleneck is is sequential calls to "host <parameters>". Separating the input, for example per TLD, and then executing the queries in parallel could help. It's also possible to use IP ranges for separation. However, only actual testing will reveal which approach works best. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170915154422.98d639bd.freebsd>