Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

incubator/elasticsearch Performance Suggestions #8348

Closed
rewt opened this issue Oct 10, 2018 · 6 comments
Closed

incubator/elasticsearch Performance Suggestions #8348

rewt opened this issue Oct 10, 2018 · 6 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@rewt
Copy link

rewt commented Oct 10, 2018

Is this a request for help?:
Is it possible to install plugins using this chart?

@rewt
Copy link
Author

rewt commented Oct 12, 2018

After running into issues with Paulo's kubernetes-elasticsearch-cluster and figuring out mlockall, I've carried lessons over to helm and happy to report things working well.

I'd also like to report some performance issues with the stock config.

Having elasticsearch service associated with client nodes reduces performance significantly if client nodes are not spec'd out with high CPU and RAM. Using stock version with client nodes, data loads perform extremely slow.

I'm not sure what the client nodes serve in this implementation and have instead pointed elasticsearch service at data nodes instead. Data loads perform much faster since those nodes are loaded with CPU and RAM. I do not see any benefit to running additional client nodes to handle requests at this time.

I've also worked out a solution for allowing mlock to run on kubernetes and have created repository https://github.com/rewt/elasticsearch-mlock

  • Clone repo and build new image
  • Load image to private repo
  • Use private repo path in values.yaml
  • update both master and data statefulset templates and client deployment as follows

insert

        securityContext:
          capabilities:
            add:
              - IPC_LOCK
              - SYS_RESOURCE 

directly above image path in elasticsearch container definition resulting in:

        - name: ES_JAVA_OPTS
          value: "-Djava.net.preferIPv4Stack=true -Xms{{ .Values.data.heapSize }} -Xmx{{ .Values.data.heapSize }}"
        {{- range $key, $value :=  .Values.cluster.env }}      
        - name: {{ $key }}
          value: {{ $value | quote }}
        {{- end }}
#begin new code
        securityContext:
          capabilities:
            add:
              - IPC_LOCK
              - SYS_RESOURCE
#end new code            
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
  • After updates, repackage chart and deploy.

Is there a way to build these options into the existing chart?

@rewt rewt changed the title incubator/elasticsearch Ability to install plugins? incubator/elasticsearch Performance Suggestions Oct 12, 2018
@desaintmartin
Copy link
Collaborator

Could the ulimit setting be put into the existing init container? This way, no need to have a separate image AND security is improved as only the init container needs the security authorization (well, at least in theory: kubernetes/kubernetes#65314).

About dedicated client nodes, it seems this is the official recommendation and allow to decouple requests from processing/storage in big clusters, but I'm not sure this is needed in small ones.

@desaintmartin
Copy link
Collaborator

desaintmartin commented Oct 26, 2018

After some thoughts, I would be interested into a PR (if official maintainers agree cc @simonswine @icereval @rendhalver) with a parameter defaulting to false doing the ulimit change. I maintain my own ES image with plugins to install plugins and it would help me reducing ad-hoc maintenance.

@stale
Copy link

stale bot commented Nov 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 25, 2018
@stale
Copy link

stale bot commented Dec 9, 2018

This issue is being automatically closed due to inactivity.

@stale stale bot closed this as completed Dec 9, 2018
@elieser1101
Copy link
Contributor

elieser1101 commented Mar 6, 2019

After some thoughts, I would be interested into a PR (if official maintainers agree cc @simonswine @icereval @rendhalver) with a parameter defaulting to false doing the ulimit change. I maintain my own ES image with plugins to install plugins and it would help me reducing ad-hoc maintenance.

hi! @desaintmartin what was your workaround pull request idea to fix this the right way?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants