che icon indicating copy to clipboard operation
che copied to clipboard

how to set more memory to `theia-ide` container?

Open Divine1 opened this issue 3 years ago • 11 comments

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 avatar Sep 02 '22 13:09 Divine1

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: https://github.com/eclipse/che/issues/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

dkwon17 avatar Sep 02 '22 18:09 dkwon17

@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

Divine1 avatar Sep 02 '22 18:09 Divine1

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.

azatsarynnyy avatar Sep 05 '22 08:09 azatsarynnyy

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).

l0rd avatar Sep 05 '22 08:09 l0rd

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?

azatsarynnyy avatar Sep 05 '22 08:09 azatsarynnyy

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

yes, it is: https://github.com/eclipse/che/issues/21518#issuecomment-1169683829

svor avatar Sep 05 '22 08:09 svor

@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

Divine1 avatar Sep 06 '22 10:09 Divine1

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.

azatsarynnyy avatar Sep 07 '22 10:09 azatsarynnyy

@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?

Divine1 avatar Sep 07 '22 13:09 Divine1

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

@Divine1 see the latest comment by Mario, above https://github.com/eclipse/che/issues/21683#issuecomment-1236677041 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

azatsarynnyy avatar Sep 07 '22 14:09 azatsarynnyy

@azatsarynnyy i will try this and share the feedback

Divine1 avatar Sep 07 '22 15:09 Divine1

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 avatar Mar 06 '23 00:03 che-bot