public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Markus Wenke <M.Wenke@web.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: to many sockets ?
Date: Wed, 04 Oct 2006 17:33:07 +0100	[thread overview]
Message-ID: <1159979587.25772.82.camel@localhost.localdomain> (raw)
In-Reply-To: <4523CD4E.10806@web.de>

Ar Mer, 2006-10-04 am 17:03 +0200, ysgrifennodd Markus Wenke:
> Hi,
> 
> I wrote a program which handles incomming sockets asynchron.
> It can handle up to 140000 connections simultaneously while every 
> connection send some bytes in both directions continuously.

Armwavingly 64K x 2 per socket worst case for non tcp windowed buffering

128K per socket x 140000 connections

8750MB of RAM

plus other overhead

Assuming you kept the socket buffer limit to 64K by setting it or
disabling window scaling you'd want a about 10GB of RAM for the sockets,
buffering and resources. With tcp windows you'd need more.

If your data rates are always low, or the link is low latency you could
set the send/receive socket buffer for each connection via setsockopt
down to say 8K and come out needing perhaps 1GB or so instead.

You will also need a very fast network for that many connections just
for the cost of headers/ack frames.

Alan


  reply	other threads:[~2006-10-04 16:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04 15:03 to many sockets ? Markus Wenke
2006-10-04 16:33 ` Alan Cox [this message]
2006-10-05  7:14   ` Markus Wenke
2006-10-05  7:58     ` Eric Dumazet
2006-10-05  8:20       ` Markus Wenke
2006-10-05  8:45         ` Eric Dumazet
2006-10-05  9:16           ` Markus Wenke
2006-10-05 21:30     ` Alan Cox
2006-10-06  5:32       ` Markus Wenke

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=1159979587.25772.82.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=M.Wenke@web.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox