diff mbox

[OSSTEST,v11,11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq

Message ID 20170616175704.7832-12-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anthony PERARD June 16, 2017, 5:56 p.m. UTC
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 ts-openstack-deploy | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Ian Jackson June 23, 2017, 1:41 p.m. UTC | #1
Anthony PERARD writes ("[OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Does this not mean that the upstream defaults are wrong ?

In general I like to see at least an upstream bug report url or number
mentioned in a comment near the workaround.

Ian.
Anthony PERARD June 23, 2017, 2:35 p.m. UTC | #2
On Fri, Jun 23, 2017 at 02:41:59PM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Does this not mean that the upstream defaults are wrong ?

That depends on what you meant by upstream.

On Ubuntu, the limit of open fd is set to an higher value via the
systemd unit file. It does not look like devstack (OpenStack) is
changing this.

In devstack, I've seen an increate of the limit of open fd, but via
systemd, so for all systemd services.


As for the memory limit, it was necessary with a host of 4G of RAM. But
I did not try again with the default limit and a host with 6G of RAM.
(The default is 0.4, here I've set it to 0.8)

> In general I like to see at least an upstream bug report url or number
> mentioned in a comment near the workaround.
> 
> Ian.
Ian Jackson June 23, 2017, 3:34 p.m. UTC | #3
Anthony PERARD writes ("Re: [OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> On Fri, Jun 23, 2017 at 02:41:59PM +0100, Ian Jackson wrote:
> > Anthony PERARD writes ("[OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> > > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > 
> > Does this not mean that the upstream defaults are wrong ?
> 
> That depends on what you meant by upstream.
> 
> On Ubuntu, the limit of open fd is set to an higher value via the
> systemd unit file. It does not look like devstack (OpenStack) is
> changing this.
> 
> In devstack, I've seen an increate of the limit of open fd, but via
> systemd, so for all systemd services.

And if one isn't using systemd ?

> As for the memory limit, it was necessary with a host of 4G of RAM. But
> I did not try again with the default limit and a host with 6G of RAM.
> (The default is 0.4, here I've set it to 0.8)

It sounds like the default calculation is not right, then ?

Ian.
Anthony PERARD June 23, 2017, 4:50 p.m. UTC | #4
On Fri, Jun 23, 2017 at 04:34:41PM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("Re: [OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> > On Fri, Jun 23, 2017 at 02:41:59PM +0100, Ian Jackson wrote:
> > > Anthony PERARD writes ("[OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> > > > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > > 
> > > Does this not mean that the upstream defaults are wrong ?
> > 
> > That depends on what you meant by upstream.
> > 
> > On Ubuntu, the limit of open fd is set to an higher value via the
> > systemd unit file. It does not look like devstack (OpenStack) is
> > changing this.
> > 
> > In devstack, I've seen an increate of the limit of open fd, but via
> > systemd, so for all systemd services.
> 
> And if one isn't using systemd ?

I guess it would have to fix devstack. Also, the default is 1k, devstack
increase it to 2k, but rabbitmq on Ubuntu have a limit at 65k.

> > As for the memory limit, it was necessary with a host of 4G of RAM. But
> > I did not try again with the default limit and a host with 6G of RAM.
> > (The default is 0.4, here I've set it to 0.8)
> 
> It sounds like the default calculation is not right, then ?

I think 0.4 means 40% of the RAM. Sorry, I should have said so. Also,
0.4 is the same on the CI loop, with a dom0 of 7G or so.
Ian Jackson June 23, 2017, 5:16 p.m. UTC | #5
Anthony PERARD writes ("Re: [OSSTEST PATCH v11 11/20] ts-openstack-deploy: Increase fd and memory limits for rabbitmq"):
> On Fri, Jun 23, 2017 at 04:34:41PM +0100, Ian Jackson wrote:
> > And if one isn't using systemd ?
> 
> I guess it would have to fix devstack. Also, the default is 1k, devstack
> increase it to 2k, but rabbitmq on Ubuntu have a limit at 65k.

My point is this: unless openstack intend to support only systemd, it
is a bug that devstack is not fixed in this way.  So that bug ought to
be filed and referenced in the workaround in openstack.

I'm not sure I'm qualified to comment on the distinction between
devstack's and ubuntu's fd limits, but shouldn't there be an openstack
bug about that too ?

> > > As for the memory limit, it was necessary with a host of 4G of RAM. But
> > > I did not try again with the default limit and a host with 6G of RAM.
> > > (The default is 0.4, here I've set it to 0.8)
> > 
> > It sounds like the default calculation is not right, then ?
> 
> I think 0.4 means 40% of the RAM. Sorry, I should have said so. Also,
> 0.4 is the same on the CI loop, with a dom0 of 7G or so.

Yes, I understood that 0.4 to mean 40% of RAM.

My point is that a calculation which gives too-small a value on a 4G
host could be improved.  May the calculation should be "40% of RAM,
but at least 3G" or something ?  Again, this might warrant an upstream bug.

Ian.
diff mbox

Patch

diff --git a/ts-openstack-deploy b/ts-openstack-deploy
index 2107760..04317a0 100755
--- a/ts-openstack-deploy
+++ b/ts-openstack-deploy
@@ -130,6 +130,20 @@  END
 osstest ALL=(ALL) NOPASSWD:ALL
 Defaults:osstest env_keep += "CURL_CA_BUNDLE"
 END
+
+    # Increase some limits of rabbit server (message broker)
+    target_cmd_root($ho, <<END);
+        set -e
+        mkdir -p /etc/rabbitmq
+END
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536
+END
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/rabbitmq/rabbitmq.config");
+[{rabbit, [{vm_memory_high_watermark, 0.8}]}].
+END
 }
 
 sub deploy() {