From 4bad49340deb06efb2f9227f21400710dc501742 Mon Sep 17 00:00:00 2001 From: Sergii Golovatiuk Date: Fri, 3 Apr 2015 01:02:58 +0200 Subject: [PATCH] Limit memcached to 50% of RAM instead of 95% memcached allocates too much RAM as under heavy load conditions. memcached should not grow higher than 50% of RAM. OOM may kill the process when server run out of free RAM. Change-Id: I9b4b0597bcc3e5aadb7905e16ac160d5bebfd00d Closes-Bug: 1439882 Signed-off-by: Sergii Golovatiuk --- deployment/puppet/openstack/manifests/horizon.pp | 5 ----- .../puppet/osnailyfacter/modular/memcached/memcached.pp | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/deployment/puppet/openstack/manifests/horizon.pp b/deployment/puppet/openstack/manifests/horizon.pp index 62b7127b9e..09b669f80f 100644 --- a/deployment/puppet/openstack/manifests/horizon.pp +++ b/deployment/puppet/openstack/manifests/horizon.pp @@ -43,11 +43,6 @@ class openstack::horizon ( $servername = $::hostname, ) { - # class { 'memcached': - # listen_ip => $cache_server_ip, - # tcp_port => $cache_server_port, - # udp_port => $cache_server_port, - # } if $debug { #syslog and nondebug case #We don't realy want django debug, it is too verbose. $django_debug = false diff --git a/deployment/puppet/osnailyfacter/modular/memcached/memcached.pp b/deployment/puppet/osnailyfacter/modular/memcached/memcached.pp index 5f1f18134e..5eda3a850c 100644 --- a/deployment/puppet/osnailyfacter/modular/memcached/memcached.pp +++ b/deployment/puppet/osnailyfacter/modular/memcached/memcached.pp @@ -1,4 +1,5 @@ notice('MODULAR: memcached.pp') class { 'memcached': - listen_ip => hiera('internal_address'), + listen_ip => hiera('internal_address'), + max_memory => '50%', }