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

how to set more memory to theia-ide container? #21683

Closed
Divine1 opened this issue Sep 2, 2022 · 12 comments
Closed

how to set more memory to theia-ide container? #21683

Divine1 opened this issue Sep 2, 2022 · 12 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@Divine1
Copy link

Divine1 commented Sep 2, 2022

Summary

while running mvn clean install command , the theia-ide container shows 477 /512 in memory. sometimes it increases to 499/512 . How to increase the memory for theia-ide to 800mb?

The cpu metric for some reason is a 10digit number. For theia-ide it shows 9632217000m/1500m . what does 9632217000m and 1500m represent ?

image

i have installed below version of eclipse-che in k8s cluster
image

below is my devfile.yaml

schemaVersion: 2.1.0
metadata:
  name: cbfsel-repo7
projects:
  - name: cbfsel-project7
    git:
      remotes:
        origin: https://gitlab.eng.com/cbf-sel.git
components:
  - container:
      image: 'artfact-prd.com:5001/eclipseche/customopenjdk8:v10'
      memoryLimit: 4G
      volumeMounts:
        - name: m2volume
          path: /home/user/.m2
    name: javacontainer
  - name: m2volume
    volume:
      size: 4G

please help me on this

Relevant information

No response

@Divine1 Divine1 added the kind/question Questions that haven't been identified as being feature requests or bugs. label Sep 2, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 2, 2022
@dkwon17 dkwon17 removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 2, 2022
@dkwon17
Copy link
Contributor

dkwon17 commented Sep 2, 2022

Hi @Divine1 , for increasing the memory limit for the theia-ide container you can:

  • You can manually update the memoryLimit for the theia-ide container definition in the editor's DevWorkspaceTemplate for your workspace, and then restart your workspace. For your case, you should be able to find a DevWorkspaceTemplate resource named theia-ide-cbfsel-repo7 in your cluster

  • Or, you're supposed to be able to create a .che/che-editor.yaml file in your repository with the following content. (However there is a bug: .che/che-editor.yaml content is not taken into account when running a workspace #21639, so this method will not work at the moment):

id: eclipse/che-theia/next      # you can choose whatever theia editor ID here
override:
  containers:
    - name: theia-ide
      memoryLimit: 800Mi

Here are some related docs: https://www.eclipse.org/che/docs/stable/end-user-guide/specifying-an-in-browser-ide-for-a-git-repository-by-using-che-editor.yaml/#using-a-custom-plug-in-registry-for-your-ide_che

@Divine1
Copy link
Author

Divine1 commented Sep 2, 2022

@dkwon17

there will be multiple users using the workspace. So i cannot manually go into the namespace and update the DevWorkspaceTemple for each workspace. please let me know if there are any alternate solutions

@azatsarynnyy
Copy link
Member

It's also possible to pass an editor Devfile through the URL che-editor parameter. However, I'm not sure if it's a suitable solution for your use case @Divine1.
Likely, deploying a custom plugin registry (that @dkwon17 has mentioned above) is the only solution here, considering providing .che/che-editor.yaml doesn't currently work as expected.

@l0rd
Copy link
Contributor

l0rd commented Sep 5, 2022

To complement @azatsarynnyy suggestion: you need to publish your customized Theia definition as a devfile.yaml somewhere accessible from your browser and point it from the URL to start your workspace like https://<che_fqdn>#<git_repository_url>?che-editor=<editor_devfile_yaml_url>. As a reference here is the current definition of Theia (https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/eclipse/che-theia/latest/devfile.yaml).

@azatsarynnyy
Copy link
Member

The cpu metric for some reason is a 10digit number. For theia-ide it shows 9632217000m/1500m . what does 9632217000m and 1500m represent ?

@svor is it a bug in the Resource Monitor plugin?

@svor
Copy link
Contributor

svor commented Sep 5, 2022

@svor is it a bug in the Resource Monitor plugin?

yes, it is: #21518 (comment)

@Divine1
Copy link
Author

Divine1 commented Sep 6, 2022

@l0rd

@azatsarynnyy

you need to publish your customized Theia definition as a devfile.yaml
please provide a sample devfile.yaml

Also, let me know where should i add the devfile.yaml configuration.

currently i use below devfile.yaml. my chectl version is chectl/0.0.20220809-next.c9f4ba1 darwin-x64 node-v16.13.2

schemaVersion: 2.1.0
metadata:
  name: cbfsel-repo7
projects:
  - name: cbfsel-project7
    git:
      remotes:
        origin: https://gitlab.eng.com/dchelladurai/cbf-sel.git
components:
  - container:
      image: 'divine6/customopenjdk8:v10'
      memoryLimit: 4G
      volumeMounts:
        - name: m2volume
          path: /home/user/.m2
    name: javacontainer
  - name: m2volume
    volume:
      size: 4G

below is my che-operator-cr-patch.yaml

apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
  name: eclipse-che
spec:
  devEnvironments:
    nodeSelector: 
      kubernetes.io/hostname: tkc-workers-wnnlk-b55cc6bdd-d6767
  components:
    cheServer:
      extraProperties:
        CHE_INFRA_KUBERNETES_WORKSPACE__START__TIMEOUT__MIN: "15"
        CHE_INFRA_KUBERNETES_PVC_QUANTITY: "5Gi"
    database:
      externalDb: true
      postgresHostName: sc2-10-186-67-195.eng.vmware.com
      postgresPort: "5432"
    pluginRegistry:
      deployment:
        containers:
          - image: "artfact-prd.vmware.com:5001/qedocker/eclipseche/che-plugin-registry:v7"
  networking:
    auth:
      identityProviderURL: https://dex-dchelladurai-chejune15.calatrava.vmware.com
      oAuthClientName: eclipse-che
      oAuthSecret: ZXhhbXBsZS1hcHAtc2VjcmV0

@azatsarynnyy
Copy link
Member

Also, let me know where should i add the devfile.yaml configuration.

@Divine1 the editor's Devfile can be placed on GitHub gist, for example.

@Divine1
Copy link
Author

Divine1 commented Sep 7, 2022

@azatsarynnyy

you need to publish your customized Theia definition as a devfile.yaml

i want to know the contents of the Theia definition devfile.yaml. And should i add the link to the Theia definition devfile.yaml in che-operator-cr-patch.yaml?

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Sep 7, 2022

i want to know the contents of the Theia definition devfile.yaml.

@Divine1 see the latest comment by Mario, above #21683 (comment)
There's a link to Che-Theia Devfile. You can copy and modify it as you need.

And should i add the link to the Theia definition devfile.yaml in che-operator-cr-patch.yaml?

no. As it's said in Mario's comment, the editor's Devfile link should be provided to the ?che-editor= parameter in URL

@Divine1
Copy link
Author

Divine1 commented Sep 7, 2022

@azatsarynnyy i will try this and share the feedback

@che-bot
Copy link
Contributor

che-bot commented Mar 6, 2023

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 6, 2023
@che-bot che-bot closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. 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

6 participants