Puppet Class: ruby::config
- Inherits:
- ruby::params
- Defined in:
- manifests/config.pp
Overview
Tunes the Ruby configuration Ruby’s garbage colleciton is notoriously inefficient and leads to overallocation of memory to any long-running process that uses Ruby e.g. puppet daemons This class allows tuning of the Ruby environment variables
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'manifests/config.pp', line 6
class ruby::config (
$gc_malloc_limit = undef,
$heap_free_min = undef,
$heap_slots_growth_factor = undef,
$heap_min_slots = undef,
$heap_slots_increment = undef
) inherits ruby::params {
if $gc_malloc_limit or
$heap_free_min or
$heap_slots_growth_factor or
$heap_min_slots or
$heap_slots_increment
{
$ensure = 'file'
} else{
$ensure = 'absent'
}
file{'ruby_environment':
ensure => $ensure,
path => $ruby::params::ruby_environment_file,
content => template('ruby/ruby.sh.erb'),
}
}
|