netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Matti Aarnio <matti.aarnio@zmailer.org>
Cc: netdev@vger.kernel.org
Subject: Re: O(n^2) or worse ?   cat /proc/net/tcp
Date: 24 Mar 2008 05:06:28 +0100	[thread overview]
Message-ID: <87lk487ol7.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080323224307.GL3700@mea-ext.zmailer.org>

Matti Aarnio <matti.aarnio@zmailer.org> writes:
> 
> I did observe odd slowness at first with  "lsof -p .."  program, 

You could oprofile it.

> then at
> "netstat -na".  Same slowdown happens with:  cat /proc/net/tcp
> (that 'cat' took 25 seconds...)

/proc/net/tcp should be only O(n^2) if the application does a lot of 
open()/seek()/read()/close() for very small chunks, but at least netstat
doesn't do that. Not sure about lsof though.

-Andi

  parent reply	other threads:[~2008-03-24  4:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23 22:43 O(n^2) or worse ? cat /proc/net/tcp Matti Aarnio
2008-03-23 23:20 ` David Miller
2008-03-24  3:33   ` Matti Aarnio
2008-03-27 11:49   ` Matti Aarnio
2008-03-27 21:28     ` David Miller
2008-03-24  4:06 ` Andi Kleen [this message]
2008-03-27 10:51   ` Matti Aarnio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lk487ol7.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=matti.aarnio@zmailer.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).