Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Resources to explore

Check out popular resources, tools, and information from Red Hat. We'll recommend more as you browse.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

A Puppet Module for tuned-adm

<p>&nbsp;</p> <quillbot-extension-portal></quillbot-extension-portal>

September 5, 2013
Romain Pelisse
Related topics:
LinuxKubernetes
Related products:
Red Hat Enterprise LinuxRed Hat OpenShift Container Platform

    Some months ago, I developed and released a small Puppet module for tuned-adm. As this tool is a nice feature of RHEL, I think it is only fair from me to advertise about it here, on the Red Hat developer blog.

    Quick overview of 'tuned-adm'

    (Photo credit: Accretion Disc)

    To make this brief, this command will take care of tuning the operating system for you, based on the usage you want to make of it. For instance, if you want this system to be a regular server, you'll use the 'throughput-performance' profile, while if you are running your Linux kernel on a laptop, you might prefer the 'powersave' profile, to protect your battery, and make it last longer.

    To have a better idea of what options are available on your system, you can simply run the following command:

    $ tuned-adm list
    Available profiles:
    - virtual-guest
    - latency-performance
    - powersave
    - balanced
    - throughput-performance
    - virtual-host
    Current active profile: /usr/lib/tuned/powersave/tuned.conf

    And with the command 'active', you can quickly check, which profile has been activated:

    $ tuned-adm active
    Current active profile: /usr/lib/tuned/powersave/tuned.conf

    Motivation behind the Puppet module

    (Photo credit: mseckington)

    At first glance, when you know Puppet a bit, one could argue that it is very easy to integrate such a command line-based tool in Puppet, using the 'exec' resources. While this is true, implementing it in an idempotent fashion - which is very important if one wants to have a "clean" Puppet run, has proven quite difficult (at least to me)

    That's why I resorted to designing a small module, which also proved to be very easy to do. On top of that, using a module brings a far more nicer integration within the Puppet manifest file:

    tuned::tune { 'powersave': }

    Testing the module

    It's fairly easy to test this module. Simply checkout the source code into the 'modules' folder of your puppet repository. If you are using the default settings, this should be '/etc/puppet/modules':

    $ tree modules/tuned/
    modules/tuned/
    |-- lib
    |   `-- puppet
    |       |-- provider
    |       |   `-- tuned
    |       |       `-- tunedadm.rb
    |       `-- type
    |           `-- tuned.rb
    `-- manifests
        `-- init.pp
    
    6 directories, 3 files

    Once this is done, you can simply add the following line to the '/etc/puppet/manifests/site.pp':

    node '' {
      tuned::tune { 'powersave': }
    }

    And at last, simply run the Puppet 'apply' command:

    # export PUPPET_REPO='/etc/puppet'
    # puppet apply --fileserverconfig ${PUPPET_REPO}/fileserver.conf --modulepath ${PUPPET_REPO}/modules/ ${DEBUG} ${PUPPET_REPO}/manifests/site.pp
    ...
    notice: /Stage[main]//Node[laptop]/Tuned::Tune[virtual-host]/Tuned[virtual-host]/ensure: created
    notice: /Stage[main]//Node[laptop]/Tuned::Tune[powersave]/Service[tuned]/ensure: ensure changed 'stopped' to 'running'
    notice: Finished catalog run in 2.32 seconds

    What's next ?

    To be feature complete, the module would need to support a tuned configuration file (as proposed by Jan-Frode Myklebust). I also still have to a couple of code improvements to do on it, and I may consider writing a factor plugin to have the profile name added to facts. It's not needed, but it would nice to have.

    In any case, do not hesitate to check out this module, and test it on your Puppet / RHEL set up, and let me know !

    Links:

    • Puppet ;
    • tuned-adm documentation ;
    • tuned-adm puppet module on Github.
    Last updated: February 24, 2024

    Recent Posts

    • Red Hat Advanced Cluster Management 5 multicluster observability add-on guide

    • Red Hat Ansible Certified Content Collection for AWS 12.0.0 delivers predictable enterprise operations

    • Deploying a sealed image mode system on AWS with secure boot

    • Resource management and capacity management on Red Hat OpenShift Virtualization

    • Layered defense in Red Hat Enterprise Linux

    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI