Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
set maxmemory to 5/6 of the system's memory and set the policy to vol…
Browse files Browse the repository at this point in the history
…atile LRU
Sam Kottler committed Nov 1, 2014
1 parent 2349c80 commit ce9dd2f
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -290,7 +290,7 @@ GRAPH
rubygems-people (0.0.29)
sudo (>= 0.0.0)
user (>= 0.0.0)
rubygems-redis (0.0.5)
rubygems-redis (0.0.6)
redisio (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-backups (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-redis/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name 'rubygems-redis'
maintainer 'RubyGems.org ops team'

version '0.0.5'
version '0.0.6'

depends 'redisio'
depends 'rubygems'
3 changes: 3 additions & 0 deletions cookbooks/rubygems-redis/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@
include_recipe 'sysctl::apply'

node.default['redisio']['default_settings']['loglevel'] = 'notice'
node.default['redisio']['default_settings']['maxmemory'] = \
"#{(node['memory']['total'][0..-3].to_i / 1024) / 1.2}mb"
node.default['redisio']['default_settings']['maxmemorypolicy'] = 'volatile-lru'

include_recipe 'redisio::install'
include_recipe 'redisio::enable'

0 comments on commit ce9dd2f

Please sign in to comment.