Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

tuned (3) Versions 1.2.0

Chef tuned cookbook handles tuned profile creation and actvation

Berkshelf/Librarian
Policyfile
Knife
cookbook 'tuned', '~> 1.2.0'
cookbook 'tuned', '~> 1.2.0', :supermarket
knife cookbook site install tuned
knife cookbook site download tuned
README
Dependencies
Quality

Tuned Chef Cookbook

Build Status Code Climate Gitter

Description

Installs tuned and enables/disables tuned profiles. For more information on tuned please see the Red Hat documentation on this daemon

Usage

Attribute overview

Define some attributes to be used by the 'tuned_profile' resource. Attributes have 3 levels default['tuned']['profile']['myprofile'] - used as the profile filename must match resource instance name

default['tuned']['profile']['myprofile']['cpu']
  • creates a heading in the profile init file [cpu]
default['tuned']['profile']['myprofile']['cpu']['governor'] = 'performance'
  • creates an key value entry in the profile file under the '[cpu]' heading

Attribute example

default['tuned']['profile']['myprofile']['cpu']['governor'] = 'performance'
default['tuned']['profile']['myprofile']['cpu']['energy_perf_bias'] = 'performance'
default['tuned']['profile']['myprofile']['cpu']['min_perf_pct'] = '100'
default['tuned']['profile']['myprofile']['disk']['readahead'] = '4096'
default['tuned']['profile']['myprofile']['vm']['transparent_hugepage'] = 'never'
default['tuned']['profile']['myprofile']['vm']['transparent_hugepage.defrag'] = 'never'
default['tuned']['profile']['myprofile']['sysctl']['kernel.sched_wakeup_granularity_ns'] = '15000000'
default['tuned']['profile']['myprofile']['sysctl']['kernel.sched_min_granularity_ns'] = '10000000'
default['tuned']['profile']['myprofile']['sysctl']['vm.dirty_background_ratio'] = '10'
default['tuned']['profile']['myprofile']['sysctl']['vm.dirty_ratio'] = '30'
default['tuned']['profile']['myprofile']['main']['include'] = 'latency-performance'
default['tuned']['profile']['myprofile']['sysctl']['vm.swappiness'] = '30'
default['tuned']['profile']['myprofile']['sysfs']['/sys/kernel/mm/transparent_hugepage/enabled'] = 'never'
default['tuned']['profile']['myprofile']['sysfs']['/sys/kernel/mm/transparent_hugepage/defrag'] = 'never'

The above example attributes when combined with a resource call:

tuned_profile 'myprofile' do
 action [:create, :enable]
end

Will create a file

  • /usr/lib/tuned/myprofile/tuned.conf

With the following contents:

# Dynamically generated default tuned profile file, applied by Chef!
[main]
include=latency-performance
[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100
[disk]
readahead=4096
[sysctl]
kernel.sched_wakeup_granularity_ns=15000000
kernel.sched_min_granularity_ns=10000000
vm.dirty_background_ratio=10
vm.dirty_ratio=30
vm.swappiness=30
[sysfs]
/sys/kernel/mm/transparent_hugepage/enabled=never
/sys/kernel/mm/transparent_hugepage/defrag=never
[vm]
transparent_hugepage=never
transparent_hugepage.defrag=never

Installs tuned if not already installed

create and enable a profile

tuned_profile 'myprofile' do
 action [:create, :enable]
end

enable a default system profile

See Red Hat Documentation for availale defaults tuned_profile 'balanced' do action [:enable] end

disable a profile (reverts to default)

tuned_profile 'myprofile' do
  action [:disable]
end
tuned_profile 'myprofile' do
  action [:default]
end

Library Provider overview

Property:

Name Description Default
main Define the [main] profile definition section {}
plugins Define the plugins profile definition {}

Property example:

tuned_profile 'lwrp_profile' do
  main (include: 'latency-performance')
  plugins(cpu: {
            governor: 'performance',
            energy_perf_bias: 'performance'
          })
  action [:create, :enable]
end

Contributing

  1. Fork it
  2. Create your feature branch + tests + Readme (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Requirements

Platform:

  • RHEL (>= 6.6)
  • CentOS (>= 6.6)

Cookbooks:

No dependencies defined

Attributes

No attributes defined

Recipes

  • tuned::default

Resources

tuned_profile

Actions

  • create: Default action.
  • default:
  • disable:
  • enable:

License and Maintainer

Maintainer:: Dave Meekin (davemeekin.github@gmail.com)

License:: Apache v2.0

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.2.0 failed this metric

FC066: Ensure chef_version is set in metadata: tuned/metadata.rb:1
FC069: Ensure standardized license defined in metadata: tuned/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: tuned/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.2.0 failed this metric

tuned does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

1.2.0 passed this metric

Publish Metric
            

1.2.0 passed this metric

Supported Platforms Metric
            

1.2.0 passed this metric

Testing File Metric
            

1.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.2.0 passed this metric