New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mosquitto tuning #1747
Add Mosquitto tuning #1747
Conversation
| ---- | ||
| cat >/etc/systemd/system/mosquitto.service.d/limits.conf <<__EOF__ | ||
| [Service] | ||
| LimitNOFILE=5000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is common (and I'm quite sure it is), I'd prefer to support this properly in our installer. I'm worried our installer actually purges this file again.
Having said that: EL8 has a default file limit of 262144 so you're SERIOUSLY lowering it. See systemctl show -p DefaultLimitNOFILE and systemctl show -p LimitNOFILE foreman-mosquitto.service as well.
Are you sure you weren't testing this on EL7 which has a much lower limit of 4096?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is that in our documentation we want to avoid users managing individual files. If this is something that we want to support, the installer should have some option to do so. It may take tuning profiles into account, depending on how we choose to implement it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ekohl. In our mosquitto testing we found the following issue in a medium tuned (not that it matters in this case) capsule when trying to register the 1015th client:
Unable to accept new connection, system socket count has been exceeded. Try increasing "ulimit -n" or equivalent.
We were able to overcome the issue making the modifications that we propose in this PR, so maybe the mosquitto system unit is not inheriting properly that property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/systemd/systemd/blob/23f3a6f5ff864fd26063c6c35fdaa6d85de566c7/NEWS#L5880-L5914 does have quite a bit to say on this.
Note that the soft limit remains at 1024 for compatibility reasons: the
traditional UNIX select() call cannot deal with file descriptors >=
1024 and increasing the soft limit globally might thus result in
programs unexpectedly allocating a high file descriptor and thus
failing abnormally when attempting to use it with select() (of
course, programs shouldn't use select() anymore, and prefer
poll()/epoll, but the call unfortunately remains undeservedly popular
at this time).
Then later:
Programs that want to take benefit of the increased limit have to "opt-in" into
high file descriptors explicitly by raising their soft limit.
That 1015 is seriously close to 1024 that it makes me suspect it's observing the soft limit by default and I suspect that if Mosquitto was modified to raise its soft limit, it would automatically get a lot more file descriptors.
I think we should pursue the path of fixing it upstream first. For now I've opened eclipse/mosquitto#2674 to see if it's a viable solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Ewoud! Do we want to add a reference to that upstream ticket to the Tuning Guide in this PR?
|
Hi @Imaanpreet I have comments on some lines adhering to the style guide. I hope, it will be helpful to you. |
|
@Imaanpreet Thanks for applying feedback. I've restarted the GHA pipeline. Please also have a look at used upstream terminology such as "Foreman" or "Katello" in your PR. In Foreman documentation, we generally use attributes, see https://github.com/theforeman/foreman-documentation/blob/master/guides/common/attributes-base.adoc |
|
The PR preview for 77b2446 is available at theforeman-foreman-documentation-preview-pr-1747.surge.sh The following output files are affected by this PR: |
|
Hello @maximiliankolb and @mjivraja . Please does this look OK now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This procedure still needs to make use of attributes, e.g. "satellite-installer" > "{foreman-installer}" and so on.
Also, it's not included, therefore we cannot see the built HTML output.
I also feel like the introduction is more of a background story then technical documentation. Would you mind rewording it?
Please also stick to "one sentence per line" as per our conventions.
Some comments are yet to be addressed. Can you have a look once again? |
|
Hello @maximiliankolb & @mjivraja : could you please check now? |
|
@adamruzicka Would you mind having a glance over this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some suggestions.
|
Hello @maximiliankolb : I have applied some more changes as per the suggestions. Could you please check now? Please correct me if I have missed anything. Thank you in advance :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments:
Right now, the first four lines are four paragraphs. It's probably best to remove the empty lines 5, 7, and 9 so that it'll be one paragraph.
Second, you have to actually include your procedure in an assembly. Right now, your content is not part of any guide.
Also, please ensure the file name, anchor, and title match.
I hope now made changes will help. |
|
Looks like there is a merge conflict right now. Please rebase to master & then we can trigger the GHA so you'll see your change rendered. |
0f22e16
to
449a090
Compare
done. could you please check now. |
| [id="REX_pull_based_transport_{context}"] | ||
| = REX pull-based transport | ||
|
|
||
| Remote Execution (REX) has been around for a while now and has served SSH-based execution very well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop this line, as it won't age well release to release.
| = REX pull-based transport | ||
|
|
||
| Remote Execution (REX) has been around for a while now and has served SSH-based execution very well. | ||
| Now, {Project} has a pull-based transport that has the features of REX but with a deployment model similar to katello-agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should drop the temporal part of this statement:
| Now, {Project} has a pull-based transport that has the features of REX but with a deployment model similar to katello-agent. | |
| {Project} has a pull-based transport that has the features of REX but with a deployment model similar to katello-agent. |
|
@Imaanpreet If you could address my two comments, and then also squash into a single commit we should be good to go. |
done @ehelms |
3d130f7
to
77b2446
Compare
|
This can be merged -- I am not doing so at present as I cannot open the cherry picks presently. |
Please cherry-pick my commits into: