Skip to content

Reduce the memory requests for workspaces #10191

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

Merged
merged 1 commit into from
May 24, 2022
Merged

Reduce the memory requests for workspaces #10191

merged 1 commit into from
May 24, 2022

Conversation

vulkoingim
Copy link
Contributor

@vulkoingim vulkoingim commented May 23, 2022

Description

Reduce the memory requests for workspaces. This should allow for more workspaces to fit in preview envs.

Related Issue(s)

Fixes #10028

NONE

@vulkoingim vulkoingim requested a review from a team May 23, 2022 15:57
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label May 23, 2022
Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

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

A bit of context that I realise might be missing. The Gitpod Installer (the source in /install/installer) is used to Install Gitpod in general. We use it in preview environment, but also in SaaS and Self-Hosted. So we have to be careful about making changes to the config, and in this case we just want to change the config of Gitpod in preview environments.

To change resource requests for workspaces in preview environments you'd want to make the change in the Werft job where we're generating (and modifying) the configuration file for the Gitpod Installer, rather in the Gitpod Installer itself.

For workspaces that change would be here

private configureWorkspaces(slice: string) {
exec(`yq w -i ${this.options.installerConfigPath} workspace.runtime.containerdRuntimeDir ${CONTAINERD_RUNTIME_DIR}`, { slice: slice });
exec(`yq w -i ${this.options.installerConfigPath} workspace.resources.requests.cpu "100m"`, { slice: slice });
}

@vulkoingim
Copy link
Contributor Author

vulkoingim commented May 24, 2022

/werft run

👍 started the job as gitpod-build-aa-ws-resources.6
(with .werft/ from main)

@vulkoingim vulkoingim changed the title Remove the memory requests for workspaces Reduce the memory requests for workspaces May 24, 2022
@vulkoingim
Copy link
Contributor Author

A bit of context that I realise might be missing. The Gitpod Installer (the source in /install/installer) is used to Install Gitpod in general. We use it in preview environment, but also in SaaS and Self-Hosted. So we have to be careful about making changes to the config, and in this case we just want to change the config of Gitpod in preview environments.

To change resource requests for workspaces in preview environments you'd want to make the change in the Werft job where we're generating (and modifying) the configuration file for the Gitpod Installer, rather in the Gitpod Installer itself.

For workspaces that change would be here

private configureWorkspaces(slice: string) {
exec(`yq w -i ${this.options.installerConfigPath} workspace.runtime.containerdRuntimeDir ${CONTAINERD_RUNTIME_DIR}`, { slice: slice });
exec(`yq w -i ${this.options.installerConfigPath} workspace.resources.requests.cpu "100m"`, { slice: slice });
}

Thanks for the context! This makes sense.

Eventually I tried to remove the resource requests from the the installer.ts but for some reason yq d -i... doesn't work there. I saw that it's more widely used in the post-process script, but opted not to do it there. Therefore I've reduced the memory to something relatively low (128m)

@vulkoingim vulkoingim requested a review from mads-hartmann May 24, 2022 13:51
@roboquat roboquat merged commit cb12a29 into main May 24, 2022
@roboquat roboquat deleted the aa/ws-resources branch May 24, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/XS team: delivery Issue belongs to the self-hosted team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce memory request of minio and workspaces in preview envs
3 participants