All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Wenke <M.Wenke@web.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: to many sockets ?
Date: Thu, 05 Oct 2006 09:14:49 +0200	[thread overview]
Message-ID: <4524B0E9.8010005@web.de> (raw)
In-Reply-To: <1159979587.25772.82.camel@localhost.localdomain>

Alan Cox schrieb:
> 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.
The default values of my system are:
SO_SNDBUF = 16384
SO_RCVBUF = 87380

> 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.
>
I tried the same scenario with SO_SNDBUF = SO_RCVBUF = 8k, so that the 
max memory is ca. 2G
and the oom-killer kills my application at the same time (at 140000 
connections).

I can not see in the messages that the system is out of memory,
there is also no swap space used

You can download my /var/log/messages at 
http://hemaho.mine.nu/~biber/messages

May you can give me a hint which line/value in the log shows me,
that the system is out of memory?


Thanks in advance

Markus Wenke


  reply	other threads:[~2006-10-05  7:14 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
2006-10-05  7:14   ` Markus Wenke [this message]
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=4524B0E9.8010005@web.de \
    --to=m.wenke@web.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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.