Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Presidency: The greased pig in the field game of American politics. -- Ambrose Bierce


devel / comp.unix.shell / In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N

SubjectAuthor
* In order to handle N concurrent connections on a Unix platform,hongy...@gmail.com
`* Re: In order to handle N concurrent connections on a Unix platform,Lew Pitcher
 `* Re: In order to handle N concurrent connections on a Unix platform,hongy...@gmail.com
  `- Re: In order to handle N concurrent connections on a Unix platform,Grant Taylor

1
In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N

<78b7994c-b1b6-4bcb-8a4b-cf3e3cb8193bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4780&group=comp.unix.shell#4780

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:4107:: with SMTP id j7mr610770qko.645.1640049655929;
Mon, 20 Dec 2021 17:20:55 -0800 (PST)
X-Received: by 2002:a05:622a:170e:: with SMTP id h14mr584502qtk.479.1640049655778;
Mon, 20 Dec 2021 17:20:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Mon, 20 Dec 2021 17:20:55 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <78b7994c-b1b6-4bcb-8a4b-cf3e3cb8193bn@googlegroups.com>
Subject: In order to handle N concurrent connections on a Unix platform,
stunnel requires nfile (ulimit -n) to be higher than 2*N
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 21 Dec 2021 01:20:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: hongy...@gmail.com - Tue, 21 Dec 2021 01:20 UTC

See the following statement here [1]:

-------------
(4) In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N, and nproc (ulimit -u) to be higher than N
-------------

I really don't understand why there is such a relationship: "In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N".

Any hints will be highly appreciated.

[1] https://www.stunnel.org/perf.html

Regards,
HZ

Re: In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N

<sprdft$phh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4781&group=comp.unix.shell#4781

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: In order to handle N concurrent connections on a Unix platform,
stunnel requires nfile (ulimit -n) to be higher than 2*N
Date: Tue, 21 Dec 2021 02:17:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <sprdft$phh$1@dont-email.me>
References: <78b7994c-b1b6-4bcb-8a4b-cf3e3cb8193bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Dec 2021 02:17:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="eca21418686c9ea61f306c7561b2c53a";
logging-data="26161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Qf1kTAd8DfKGp0zBbXLnPGNVbe6QB3nk="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:/xZExnW8j2jzAEmOkf6OKkYzxUA=
 by: Lew Pitcher - Tue, 21 Dec 2021 02:17 UTC

On Mon, 20 Dec 2021 17:20:55 -0800, hongy...@gmail.com wrote:

> See the following statement here [1]:
>
> -------------
> (4) In order to handle N concurrent connections on a Unix platform,
> stunnel requires nfile (ulimit -n) to be higher than 2*N, and nproc
> (ulimit -u) to be higher than N -------------
>
> I really don't understand why there is such a relationship: "In order to
> handle N concurrent connections on a Unix platform, stunnel requires
> nfile (ulimit -n) to be higher than 2*N".
>
> Any hints will be highly appreciated.

Stunnel is a "load-balancing proxy", implying that relays traffic between
clents and servers. If there are N client connections, then stunnel will
require 2 * N connections, one for each of N client connections to
stunnel, and one for each of N corresponding stunnel connections to the
appropriate servers.

As each stunnel connection will consume a file descriptor, N client
connections will cause stunnel to consume 2 * N file descriptors, one for
each side of the proxy.

The Unix kernel places both hard and soft limits on a number of critical
resources, including how many file descriptors a process can have open at
any one time. The shell "ulimit" builtin allows you to manipulate some of
these limits (within reason).

The stunnel documentation is advising you that you may have to adjust the
maximum number of file descriptors a process may have open, so that
stunnel may operate as you intend it. The instructions tell you to
determine the maximum number of connections that stunnel will handle,
double that number, and use the resulting value as the maximum number of
file handles.

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N

<2fb3898a-dc7c-4c9c-8787-16ac6d3a6d1bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4782&group=comp.unix.shell#4782

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:5c50:: with SMTP id j16mr1400833qtj.255.1640077208777;
Tue, 21 Dec 2021 01:00:08 -0800 (PST)
X-Received: by 2002:ac8:5fd1:: with SMTP id k17mr1365894qta.352.1640077208645;
Tue, 21 Dec 2021 01:00:08 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 21 Dec 2021 01:00:08 -0800 (PST)
In-Reply-To: <sprdft$phh$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=172.104.91.163; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 172.104.91.163
References: <78b7994c-b1b6-4bcb-8a4b-cf3e3cb8193bn@googlegroups.com> <sprdft$phh$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2fb3898a-dc7c-4c9c-8787-16ac6d3a6d1bn@googlegroups.com>
Subject: Re: In order to handle N concurrent connections on a Unix platform,
stunnel requires nfile (ulimit -n) to be higher than 2*N
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 21 Dec 2021 09:00:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 39
 by: hongy...@gmail.com - Tue, 21 Dec 2021 09:00 UTC

On Tuesday, December 21, 2021 at 10:17:38 AM UTC+8, Lew Pitcher wrote:
> On Mon, 20 Dec 2021 17:20:55 -0800, hongy...@gmail.com wrote:
>
> > See the following statement here [1]:
> >
> > -------------
> > (4) In order to handle N concurrent connections on a Unix platform,
> > stunnel requires nfile (ulimit -n) to be higher than 2*N, and nproc
> > (ulimit -u) to be higher than N -------------
> >
> > I really don't understand why there is such a relationship: "In order to
> > handle N concurrent connections on a Unix platform, stunnel requires
> > nfile (ulimit -n) to be higher than 2*N".
> >
> > Any hints will be highly appreciated.
> Stunnel is a "load-balancing proxy", implying that relays traffic between
> clents and servers. If there are N client connections, then stunnel will
> require 2 * N connections, one for each of N client connections to
> stunnel, and one for each of N corresponding stunnel connections to the
> appropriate servers.
>
> As each stunnel connection will consume a file descriptor, N client
> connections will cause stunnel to consume 2 * N file descriptors, one for
> each side of the proxy.
>
> The Unix kernel places both hard and soft limits on a number of critical
> resources, including how many file descriptors a process can have open at
> any one time. The shell "ulimit" builtin allows you to manipulate some of
> these limits (within reason).
>
> The stunnel documentation is advising you that you may have to adjust the
> maximum number of file descriptors a process may have open, so that
> stunnel may operate as you intend it. The instructions tell you to
> determine the maximum number of connections that stunnel will handle,
> double that number, and use the resulting value as the maximum number of
> file handles.

Got it. I mistook 2 * N for another sign 2 ^ N, which puzzles most, so I asked this question.

HZ

Re: In order to handle N concurrent connections on a Unix platform, stunnel requires nfile (ulimit -n) to be higher than 2*N

<spt4kr$uem$2@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4783&group=comp.unix.shell#4783

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: In order to handle N concurrent connections on a Unix platform,
stunnel requires nfile (ulimit -n) to be higher than 2*N
Date: Tue, 21 Dec 2021 10:59:05 -0700
Organization: TNet Consulting
Message-ID: <spt4kr$uem$2@tncsrv09.home.tnetconsulting.net>
References: <78b7994c-b1b6-4bcb-8a4b-cf3e3cb8193bn@googlegroups.com>
<sprdft$phh$1@dont-email.me>
<2fb3898a-dc7c-4c9c-8787-16ac6d3a6d1bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 21 Dec 2021 17:58:51 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="31190"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <2fb3898a-dc7c-4c9c-8787-16ac6d3a6d1bn@googlegroups.com>
Content-Language: en-US
 by: Grant Taylor - Tue, 21 Dec 2021 17:59 UTC

On 12/21/21 2:00 AM, hongy...@gmail.com wrote:
> Got it. I mistook 2 * N for another sign 2 ^ N, which puzzles most,
> so I asked this question.

Oops.

Exponential growth (2^N) is decidedly different than linear growth (2xN).

--
Grant. . . .
unix || die

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor