Created
March 24, 2014 18:41
-
-
Save zpatten/9746434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (node['memory']['total'].to_i / 4) > ((node['chef_server']['postgresql']['shmmax'].to_i / 1024) - 2097152) | |
# guard against setting shared_buffers > shmmax on hosts with installed RAM > 64GB | |
# use 2GB less than shmmax as the default for these large memory machines | |
node.override['chef_server']['postgresql']['shared_buffers'] = "14336MB" | |
else | |
node.override['chef_server']['postgresql']['shared_buffers'] = "#{(node['memory']['total'].to_i / 4) / (1024)}MB" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment