Skip to content
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

sap_hana_preconfigure: net.core.wmem_max and net.core.rmem_max kernel parameters are always set from current system values #734

Open
GutiPerez opened this issue May 7, 2024 · 2 comments
Assignees

Comments

@GutiPerez
Copy link

Currently, for applying SAP note 2382421, net.core.wmem_max and net.core.rmem_max kernel parameters are always set from the current, loaded, maximum values of net.ipv4.tcp_wmem and net.ipv4.tcp_wmem kernel parameters, respectively.

With this implementation, if we add net.ipv4.tcp_wmem and net.ipv4.tcp_rmem to __sap_hana_preconfigure_kernel_parameters_default variable, it needs two runs of the role in order to apply the values (as the reload happens at the very end), and if we would add them directly, they would never be applied.

As a suggestion, a new specific variable for not triggering the block if we are going to define the values here would an easy solution.

@berndfinger berndfinger self-assigned this May 7, 2024
@berndfinger
Copy link
Member

@GutiPerez Thanks for your suggestion, which makes sense to me. The purpose of the current code is to guarantee the following requirement mentioned in SAP note 2382421: ... it must be ensured that the wmem_max and rmem_max values are at least the same as the respective maximum value of the parameters net.ipv4.tcp_wmem and net.ipv4.tcp_rmem.

Instead of introducing a new role parameter, I am thinking of running the tasks which are getting the current values of net.core.wmem_max and/or net.core.rmem_max tunables only if net.ipv4.tcp_wmem or net.ipv4.tcp_rmem have not been defined in the playbook or inventory. Do you see any possible issues with this approach?

@GutiPerez
Copy link
Author

Hello @berndfinger

Thanks a lot for the quick response.

I do not see any issue in your approach. That would solve the issue of not being able to set the max values despite being defined in the __sap_hana_preconfigure_kernel_parameters_defaultvariable.

A more complete approach, that may be worth looking into, would be that:

  • If 'net.ipv4.tcp_wmem' and 'net.ipv4.tcp_rmem' are defined in the playbook or inventory, net.core.wmem_max and net.core.rmem_max are set from the max values of the former variables.
  • If 'net.ipv4.tcp_wmem' and 'net.ipv4.tcp_rmem' are not defined in the playbook or inventory, net.core.wmem_max and net.core.rmem_max are set from the current system values (as they are now).

That way, you enforce the SAP note requirement in the two situations. Obviously, this workflow is more complex to do in Ansible, so maybe it is not worth the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants