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

Feature request: configure tuned custom profiles in the module #1

Open
ubellavance opened this issue Jun 7, 2023 · 3 comments
Open

Comments

@ubellavance
Copy link

Similar to this: thias/puppet-tuned#15

@jcpunk
Copy link
Contributor

jcpunk commented Jun 12, 2023

I'm not sure how this would work in practice.

It is possible to load scripts that interrogate the system and return values (cf. powersave profile) which could itself have other file dependencies. So dropping in a managed INI style file could work, it would be an incomplete implementation.

I'm inclined to suggest folks use stdlib::manage to generate the ini file in hiera. It would be a bit ugly, but doesn't lead people into thinking this module supports the whole feature set.

stdlib::manage:
  file:
    /usr/lib/tuned/custom-profile:
      ensure: directory
      owner: root
      group: root
      mode: "0644"
    /usr/lib/tuned/custom-profile/tuned.conf:
      ensure: file
      owner: root
      group: root
      mode: "0644"
      content: "[main]\ninclude=virtual-guest\n[sysctl]\nvm.dirty_ratio=30\n"
      notify: Class[tuned]

@greatflyingsteve
Copy link

greatflyingsteve commented Jul 30, 2024

This feature is also implemented in ceritsc-tuned, and we use it fairly extensively. Slight disclaimer is needed that it's not without issues, and I'm actually about to go try and contribute a fix for it.

Because that module is kinda dead in the water, I'm considering moving us to this module, but would consider this feature a prereq for a move. We have some pretty exhaustively tuned systems, and some of the tune settings utilize Facter data about memory amounts, etc. to generate values for certain sysctls, which would be effectively impossible to do in Hiera.

If I cleaned up that implementation and ported something like it here, would that be unwelcome?

@jcpunk
Copy link
Contributor

jcpunk commented Jul 31, 2024

I generally don't turn down contributions that work for people.

If you're willing to put forth the effort, I'll give you a fair review.

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

3 participants