-
-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does this cookbook set the es max heap size to 60% of available memory? #209
Comments
Hey, nothing too clever going on, it simply gives the ES_HEAP_SIZE a bit more preference then the filesystem cache, which seemed to work nice on smaller testing instances... We could just do true 1/2 there, no reason not to. |
Great thanks! |
Would it not be a good idea to cap the memory at 30G as well? On Mon, May 12, 2014 at 6:11 PM, ejsarge-gr [email protected]:
|
@maf23 Hmm, capping it sounds a bit excessive (somebody just wants to have a 128GB heap just to try things out), but we could definitely print out an |
What about an interval. If 60% of the memory is between 30 and 48G then set The current cookbook create a bad value if the machine has between 50 and On Tue, May 13, 2014 at 7:44 AM, Karel Minarik [email protected]:
|
@maf23 Hmm, that's an interesting idea, right. I would probably keep it for a refactored, rewritten cookbook... |
Then I'll implement it in my wrapper ;) On Tue, May 13, 2014 at 7:55 AM, Karel Minarik [email protected]:
|
I came here to note that capping the default value for allocated_memory at 32GB might be desirable. On a c3.8xlarge the current calculations result in a 35GB heap. There's pretty strong warning against going above 32GB in the ES docs. You can still allow people to manually set allocated_memory to whatever they want while ensuring the default value is safe. Something like the following in attributes/default.rb
|
@sciurus Yeah, I absolutely agree on this point, and I do agree that people can still set the attribute directly. The only problem is I don't have the bandwidth to properly test changes like this right now -- the testing support of the cookbook is too simple and weak. It's definitely something I'd add to to any future, refactored cookbook, as I've noted above, if that's OK. |
Sounds good. |
I may be completely mis-understanding the code but it appears to me that the cookbook sets the heap size to 60% of available memory when normal advice is to allocate 50%.
cookbook-elasticsearch / attributes / default.rb : line 47 says:
allocated_memory = "#{(node.memory.total.to_i * 0.6 ).floor / 1024}m"
Advice: http://asquera.de/opensource/2012/11/25/elasticsearch-pre-flight-checklist/
The text was updated successfully, but these errors were encountered: