[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: netstat performance



On 06/29/11 at 10:15am, ChadDavis wrote:
> I notice that the following two invocations of netstat have
> drastically different execution times:
> 
> netstat
> 
> netstat -n
> 
> 
> When you just use numerical addresses, it executes almost instantly,
> but with the domain names and whatever you call those logical names
> for the port numbers, such as 'www', it takes quite while ( 5-10
> seconds).
> 
> Not a big deal, but just made me think.  Surely the name resolution
> isn't that costly is it?

Depends on latency and distance to your DNS server, how long it takes the DNS
server to perform the recursive query or forward to a server which does,
whether you have the answer cached locally or at any of the servers along the
way, etc. So it can vary wildly.. 5 seconds seems high to me, it takes about 1
for me and I have a lot of active connections.

-- 
Liam

Attachment: signature.asc
Description: Digital signature


Reply to: