st2-packages icon indicating copy to clipboard operation
st2-packages copied to clipboard

Suggestion: Update installer scripts to set kernel parameters for Mongo

Open LindsayHill opened this issue 8 years ago • 2 comments

If a user follows our standard installation instructions, either using the one-liner, or following the manual steps, they will get these warning messages with MongoDB:

2017-02-01T23:10:31.846+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-02-01T23:10:31.846+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-02-01T23:10:31.847+0000 I CONTROL  [initandlisten]
2017-02-01T23:10:31.847+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2017-02-01T23:10:31.847+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2017-02-01T23:10:31.847+0000 I CONTROL  [initandlisten]
2017-02-01T23:10:31.847+0000 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 4096 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number of files.

(NB Above is seen with CentOS 7.3. Ubuntu 14.04 will only have the first two warnings).

Should we: (A) Update our installer script to set these values (B) Update our documentation to recommend that the user changes these values

Thoughts?

LindsayHill avatar Feb 02 '17 00:02 LindsayHill

Yeah, we had discussions similar to that previously. The general idea is that we provide minimal installation and more fine tuning like kernel, mongo, rabbit, postgres is out of scope, because it's possible to write a novel for optimizing each service/setting. Even st2.conf has so many advanced options https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample.

So IMO if it blocks installation and minimally working st2, - we include the change in packaging/scripts, if it's "fine-tuning" - leave that for users.

I have no strong opinions about updating documentation, but there are respective articles in mongo docs: https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/ and https://docs.mongodb.com/manual/reference/ulimit/

arm4b avatar Feb 02 '17 14:02 arm4b

I think updating the docs is a minimum, even if it is just to link to the MongoDB docs directly. The problem is the WARNING statement above - some users see it and freak out. The fewer distractions for users, the better.

(IIRC, there's something similar related to PostgreSQL/Mistral that probably needs following up)

LindsayHill avatar Feb 02 '17 16:02 LindsayHill