What is the chefonic method to set ES_HEAP_SIZE=


#1

Hi,

I want to set ES_HEAP_SIZE to half of server ram. How do I get server ram
from chef so I can set?

Thanks


#2

node.memory.total

On Monday, November 24, 2014 at 5:54 PM, David Montgomery wrote:

Hi,

I want to set ES_HEAP_SIZE to half of server ram. How do I get server ram from chef so I can set?

Thanks


#3

Or, if you are not using the Really Bad™ method_missing syntax:

node[‘memory’][‘total’]

–Noah

On Nov 24, 2014, at 8:58 PM, Daniel Condomitti daniel@condomitti.com wrote:

node.memory.total
On Monday, November 24, 2014 at 5:54 PM, David Montgomery wrote:

Hi,

I want to set ES_HEAP_SIZE to half of server ram. How do I get server ram from chef so I can set?

Thanks


#4

“#{(node[‘memory’][‘total’].to_i * 0.5).floor / 1024}m”

will give you something like “4096m”

On Mon, Nov 24, 2014 at 9:12 PM, Noah Kantrowitz noah@coderanger.net
wrote:

Or, if you are not using the Really Bad™ method_missing syntax:

node[‘memory’][‘total’]

–Noah

On Nov 24, 2014, at 8:58 PM, Daniel Condomitti daniel@condomitti.com
wrote:

node.memory.total
On Monday, November 24, 2014 at 5:54 PM, David Montgomery wrote:

Hi,

I want to set ES_HEAP_SIZE to half of server ram. How do I get server
ram from chef so I can set?

Thanks