All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Storner <henrik-kernel@hswn.dk>
To: linux-kernel@vger.kernel.org
Subject: Re: surprisingly slow accept/connect cycle time
Date: Tue, 24 May 2005 21:34:00 +0000 (UTC)	[thread overview]
Message-ID: <d706k8$kam$1@voodoo.hswn.dk> (raw)
In-Reply-To: 17043.37997.993745.877259@newbie.ardi.com

In <17043.37997.993745.877259@newbie.ardi.com> "Clifford T. Matthews" <ctm@ardi.com> writes:

>While writing some test code, I was surprised to find a couple
>processes running very slowly.  The attached program illustrates this.
>The program forks and the child attempts to accept 1000 connections.
>The parent attempts to connect 1000 times.  This often takes minutes
>to run, on 2.4 kernels and 2.6 kernels (including 2.6.12-rc4).

Have you tried using non-blocking sockets ?

I've been doing some network programming myself lately, and my apps 
have no problem handling a sustained load of 40 connections/second -
which should handle your testcase in 25 seconds. And I'm quite sure it
will be less, because it has handled peak loads of several hundred
connections per second.

But my program uses non-blocking sockets exclusively.


Henrik


  reply	other threads:[~2005-05-24 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 20:54 surprisingly slow accept/connect cycle time Clifford T. Matthews
2005-05-24 21:34 ` Henrik Storner [this message]
2005-05-25  3:44 ` Chris Wedgwood
  -- strict thread matches above, loose matches on Subject: below --
2005-05-24 22:27 Parag Warudkar

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='d706k8$kam$1@voodoo.hswn.dk' \
    --to=henrik-kernel@hswn.dk \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.