Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

OHAI-550 java -version wastes memory #286

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

kcbraunschweig commented Feb 5, 2014

On newer versions of java the java heap can start as the smaller of 1/4 of memory or 1gb rather than 64mb like in the past. Even when just running -version. Protect against mmaping 1gb of memory for no reason by specifying a 16mb max heap. This avoids causing pain for boxes where memory is mostly used.

This is for ticket: https://tickets.opscode.com/browse/OHAI-550

kcbraunschweig added some commits Feb 5, 2014

@kcbraunschweig kcbraunschweig OHAI-550 java -version wastes memory
On newer versions of java the java heap can start as the smaller of 1/4 of memory or 1gb rather than 64mb like in the past. Even when just running -version. Protect against mmaping 1gb of memory for no reason by specifying a 16mb max heap. This avoids causing pain for boxes where memory is mostly used.
0c36ad4
@kcbraunschweig kcbraunschweig Updated tests for new command 9ca55f4
@kcbraunschweig kcbraunschweig go with 64mb instead because that was the old default be9e518
Contributor

sean-horn commented Mar 27, 2014

This change should be applied to both ohai6 and ohai7, so that it may be used in ongoing versions of Chef 10

Owner

btm commented Apr 1, 2014

This has been merged to master and rewritten for 6-stable in af34511

@btm btm closed this Apr 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment