Re: [PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-18 Thread Björn Jacke
On 2019-09-18 at 08:27 +0200 Lukas Tribus sent off:
> If you want to see the ulimit value move, bump your global maxconn and you
> will see how haproxy adjusts the ulimit.

true, I can confirm this.

Thanks
Björn



Re: [PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-18 Thread Lukas Tribus
Hello Björn,


On Wednesday, 18 September 2019, Björn Jacke  wrote:

> Hi,
> On 2019-09-18 at 01:23 +0200 Lukas Tribus sent off:
> > On Wed, Sep 18, 2019 at 1:14 AM PR Bot 
> wrote:
> > > Description:
> > >systemd by default limits the max open files to 1k, which also
> limits
> > >the socket connections to 1k, the service script must be told to
> > >remove the limit.
> >
> > Since haproxy is started as root we have the privilege to bump the
> > ulimit ourselfs. We cannot rely on init scripts or systemd to set
> > correct values. The values are computed automatically based on maxconn
> > configuration and then set accordingly by haproxy itself.
>
> hm, and how come that the stats page shows:
>
> system limits: memmax = unlimited; ulimit-n = 1023
> maxsock = 1023; maxconn = 240; maxpipes = 0
>
> unless the systemd limit is removed with the change I made in the systemd
> service file?


Because with a global maxconn configuration of 240, haproxy does not need
to configure more.

Like I said, this is based on maxconn (ulimit will be about twice the
maxconn value with some overhead).

If you want to see the ulimit value move, bump your global maxconn and you
will see how haproxy adjusts the ulimit.


lukas


Re: [PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-18 Thread Björn Jacke
On 2019-09-18 at 08:06 +0200 Björn Jacke sent off:
> unless the systemd limit is removed with the change I made in the systemd
> service file?

systemd uses cgroups and cgroup limits, which are enforced independently from
ulimits, and this is probably why this is required and why haproxy is currenlty
not able to raise this over 1k.

Björn



Re: [PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-18 Thread Björn Jacke
Hi,
On 2019-09-18 at 01:23 +0200 Lukas Tribus sent off:
> On Wed, Sep 18, 2019 at 1:14 AM PR Bot  
> wrote:
> > Description:
> >systemd by default limits the max open files to 1k, which also limits
> >the socket connections to 1k, the service script must be told to
> >remove the limit.
> 
> Since haproxy is started as root we have the privilege to bump the
> ulimit ourselfs. We cannot rely on init scripts or systemd to set
> correct values. The values are computed automatically based on maxconn
> configuration and then set accordingly by haproxy itself.

hm, and how come that the stats page shows:

system limits: memmax = unlimited; ulimit-n = 1023
maxsock = 1023; maxconn = 240; maxpipes = 0

unless the systemd limit is removed with the change I made in the systemd
service file?

Björn



Re: [PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-17 Thread Lukas Tribus
Hello,

On Wed, Sep 18, 2019 at 1:14 AM PR Bot  wrote:
> Description:
>systemd by default limits the max open files to 1k, which also limits
>the socket connections to 1k, the service script must be told to
>remove the limit.

Since haproxy is started as root we have the privilege to bump the
ulimit ourselfs. We cannot rely on init scripts or systemd to set
correct values. The values are computed automatically based on maxconn
configuration and then set accordingly by haproxy itself.


So we don't really care about systemd or actual system default limits.


Lukas



[PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-17 Thread PR Bot
Dear list!

Author: Björn Jacke 
Number of patches: 1

This is an automated relay of the Github pull request:
   MINOR: remove limit of 1k socket connections with systemd

Patch title(s): 
   MINOR: remove limit of 1k socket connections with systemd

Link:
   https://github.com/haproxy/haproxy/pull/280

Edit locally:
   wget https://github.com/haproxy/haproxy/pull/280.patch && vi 280.patch

Apply locally:
   curl https://github.com/haproxy/haproxy/pull/280.patch | git am -

Description:
   systemd by default limits the max open files to 1k, which also limits
   the socket connections to 1k, the service script must be told to
   remove the limit.

Instructions:
   This github pull request will be closed automatically; patch should be
   reviewed on the haproxy mailing list (haproxy@formilux.org). Everyone is
   invited to comment, even the patch's author. Please keep the author and
   list CCed in replies. Please note that in absence of any response this
   pull request will be lost.



[PR] MINOR: remove limit of 1k socket connections with systemd

2019-09-17 Thread PR Bot
Dear list!

Author: Björn Jacke 
Number of patches: 1

This is an automated relay of the Github pull request:
   MINOR: remove limit of 1k socket connections with systemd

Patch title(s): 
   MINOR: remove limit of 1k socket connections with systemd

Link:
   https://github.com/haproxy/haproxy/pull/280

Edit locally:
   wget https://github.com/haproxy/haproxy/pull/280.patch && vi 280.patch

Apply locally:
   curl https://github.com/haproxy/haproxy/pull/280.patch | git am -

Description:
   systemd by default limits the max open files to 1k, which also limits
   the socket connections to 1k, the service script must be told to
   remove the limit.

Instructions:
   This github pull request will be closed automatically; patch should be
   reviewed on the haproxy mailing list (haproxy@formilux.org). Everyone is
   invited to comment, even the patch's author. Please keep the author and
   list CCed in replies. Please note that in absence of any response this
   pull request will be lost.