eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.98k stars 1.19k forks source link

Eclipse CHE Workspace Memory Limits #22891

Open gss2002 opened 6 months ago

gss2002 commented 6 months ago

Summary

It seems as if Eclipse Che Workspaces are limited to 1152Mib of memory. I attempted to set: " CHE_WORKSPACE_DEFAULTMEMORYLIMIT__MB: "4096" it seems to be ignored. The only way that seemed to get the mem increased was to edit each individual workspace and adjust the memoryLimit setting. Does anyone have any insight if this actually works. Also setting memoryLimit in a devfile.yaml also seems to be ignored.

apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
  annotations:
    che.eclipse.org/checluster-defaults-cleanup: '{"containers.resources":"true","spec.components.dashboard.headerMessage":"true","spec.components.pluginRegistry.openVSXURL":"true","spec.devEnvironments.defaultComponents":"true","spec.devEnvironments.defaultEditor":"true","spec.devEnvironments.disableContainerBuildCapabilities":"true"}'
  creationTimestamp: "2024-02-08T04:05:25Z"
  finalizers:
  - checluster.che.eclipse.org
  - cluster-resources.finalizers.che.eclipse.org
  - cheGateway.clusterpermissions.finalizers.che.eclipse.org
  - dashboard.clusterpermissions.finalizers.che.eclipse.org
  generation: 12
  name: eclipse-che
  namespace: eclipse-che
  resourceVersion: "209602813"
  uid: f7854180-845b-49e7-a534-33595baebc90
spec:
  components:
    cheServer:
      debug: false
      extraProperties:
        CHE_OIDC_USERNAME__CLAIM: email
        CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB: "4096"`
schemaVersion: 2.2.0
components:
  - name: universal-developer-image
    container:
      image: quay.io/devfile/universal-developer-image:ubi8-latest
      memoryLimit: 4Gi
attributes:
  .vscode/extensions.json: |
    {
      "recommendations": [
        "mhutchie.git-graph"
        "felipecaputo.git-project-manager"
        "pinage404.git-extension-pack"
        "eamodio.gitlens"
        "hashicorp.terraform"
        "redhat.java"
      ]
    }
commands:
  - id: installdependencies
    exec:
      label: "[UD] install dependencies"
      component: tools
      workingDir: ${PROJECT_SOURCE}
      commandLine: "curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash"
      group:
        kind: build
        isDefault: true

Works but only with individual workspaces:

    - container:
        image: quay.io/devfile/universal-developer-image:ubi8-latest
        memoryLimit: 4Gi
        sourceMapping: /projects
      name: universal-developer-image
status:
  conditions:
  - lastTransitionTime: "2024-03-22T19:55:06Z"
    message: Workspace is stopped
    status: "False"
    type: Started

Once the POD starts running its always "1152" no matter what is set unless you edit the workspace template:

Containers:
  universal-developer-image:
    Container ID:   containerd://5f1e0362978f3facc80af2ab9c7460b7b0bd9f1256a9febe46b1523132d9aff3
    Image:          quay.io/devfile/universal-developer-image:ubi8-latest
    Image ID:       quay.io/devfile/universal-developer-image@sha256:ba03058298b8f67bce60226a0ebcb243f60ac59ce77b02b97735467ecedce56f
    Ports:          3100/TCP, 13131/TCP, 13132/TCP, 13133/TCP
    Host Ports:     0/TCP, 0/TCP, 0/TCP, 0/TCP
    State:          Running
      Started:      Fri, 22 Mar 2024 17:57:04 -0400
    Ready:          True
    Restart Count:  0
    Limits:
      memory:  1152Mi
    Requests:
      memory:  320Mi

Relevant information

No response

tolusha commented 6 months ago

The field below has no effect, since it was introduced for che-server devworkspace engine (prior 7.42.0)

spec:
  components:
    cheServer:
      debug: false
      extraProperties:
        CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB: "4096"`

Use [1] to configure resource limits for workspaces.

[1] https://devfile.io/docs/2.2.2/limiting-resources-usage#procedure

ibuziuk commented 6 months ago

@deerskindoll could you please double-check that we do not have obsolete docs related to CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB after that the issue can be closed

deerskindoll commented 6 months ago

@deerskindoll could you please double-check that we do not have obsolete docs related to CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB after that the issue can be closed

on it

deerskindoll commented 6 months ago

@ibuziuk CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB is not featured in any of the current docs