Skip to content
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

Update heap size and compute resources documentation #1785

Merged
merged 5 commits into from
Sep 30, 2019

Conversation

charith-elastic
Copy link
Contributor

Removes information duplicated between the two sections and emphasises the need to set resource constraints.

Implementation of #1454 will necessitate a few more minor updates to these sections but this change covers the important points.

Part of #1734

@@ -84,7 +84,51 @@ spec:
memory: 4Gi
----

For more information, see the Elasticsearch documentation on link:https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html[Setting the heap size].

If no resource constraints are defined in the object specification, the operator applies a default memory `request` of 2Gi based on the assumption that Elasticsearch heap size is set to the default of 1Gi. If the Kubernetes cluster is configured with https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/[LimitRanges] that enforce a minimum memory constraint, they could interfere with the operator default and cause object creation to fail.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a bit weird to me that we explain our default 2GB request in the "JVM heap size" section. I would move that to "Set custom resources", and here only mention we apply the default 1Gi heap size (with maybe a link to the "Set custom resources" section).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom resources page mentions the default and directs to here:

For Elasticsearch, if no memory request is set in the podTemplate spec, the operator applies a default memory request as described in the <<{p}-jvm-heap-size>> section.

In fact, whenever Elasticsearch is mentioned, the custom resources page always instructs the users to read the heap size section. I think that's a good way to get people to consider heap sizing and also ensure that we don't repeat things in multiple places. WDYT?

Copy link
Contributor

@sebgl sebgl Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure that we don't repeat things in multiple places

Agreed.

However, if I want to learn about how ECK deals with resources limits and requests, and how does that relate to LimitRanges, I think I would go look at "Managing compute resources". I'd probably be fine since that links to the JVM heap size section as you mentioned. But I think I would prefer things being done the other way around: the explanation about LimitRanges, default requests and limits should appear in the "Managing compute resources" section IMHO. And have the JVM heap size section link to that.
Would it simplify things to have all memory/heap size related stuff on the same single page?

(That's not a strong opinion, just a small preference, still approving the PR as is :))

@@ -84,7 +84,51 @@ spec:
memory: 4Gi
----

For more information, see the Elasticsearch documentation on link:https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html[Setting the heap size].

If no resource constraints are defined in the object specification, the operator applies a default memory `request` of 2Gi based on the assumption that Elasticsearch heap size is set to the default of 1Gi. If the Kubernetes cluster is configured with https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/[LimitRanges] that enforce a minimum memory constraint, they could interfere with the operator default and cause object creation to fail.
Copy link
Contributor

@sebgl sebgl Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure that we don't repeat things in multiple places

Agreed.

However, if I want to learn about how ECK deals with resources limits and requests, and how does that relate to LimitRanges, I think I would go look at "Managing compute resources". I'd probably be fine since that links to the JVM heap size section as you mentioned. But I think I would prefer things being done the other way around: the explanation about LimitRanges, default requests and limits should appear in the "Managing compute resources" section IMHO. And have the JVM heap size section link to that.
Would it simplify things to have all memory/heap size related stuff on the same single page?

(That's not a strong opinion, just a small preference, still approving the PR as is :))

@charith-elastic
Copy link
Contributor Author

@sebgl Please have another look

Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@charith-elastic charith-elastic merged commit 66d8524 into elastic:master Sep 30, 2019
@charith-elastic charith-elastic deleted the doc-compute-resources branch September 30, 2019 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants