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

[content-service] Use gsutil to upload and download backups #10626

Merged
merged 5 commits into from
Jul 5, 2022
Merged

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Jun 13, 2022

Description

Switch to gcloud gsutil cli to upload and downloads for GCS interaction with backups. This improves the speed and also removes the multipart complexity from the codebase.

Release Notes

Improve transfers for S3 when backed by GCS

@aledbf aledbf force-pushed the aledbf/gs branch 4 times, most recently from 5908dc8 to 293c1d4 Compare June 29, 2022 23:05
@aledbf aledbf marked this pull request as ready for review July 2, 2022 00:27
@aledbf aledbf requested a review from a team July 2, 2022 00:27
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Jul 2, 2022
@aledbf aledbf changed the title [content-service] Upload GCP backups using gsutil [content-service] Use gsutil to upload and download backups Jul 2, 2022
components/ws-daemon/debug.Dockerfile Outdated Show resolved Hide resolved
components/ws-daemon/debug.Dockerfile Outdated Show resolved Hide resolved
components/ws-daemon/leeway.Dockerfile Outdated Show resolved Hide resolved
components/content-service/pkg/storage/gcloud.go Outdated Show resolved Hide resolved
components/content-service/pkg/storage/gcloud.go Outdated Show resolved Hide resolved
args := fmt.Sprintf(`gsutil -q -m %v\
-o "GSUtil:parallel_composite_upload_threshold=150M" \
-o "GSUtil:parallel_process_count=3" \
-o "GSUtil:parallel_thread_count=6" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Six threads seem to request lots of CPU resources, I captured the below picture from gen51 cluster.
image

Should we keep the parameter as now or should we limit more CPU resources for gsutil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we keep the parameter as now or should we limit more CPU resources for gsutil?

We have already limited the number of simultaneous backups to three. Also, the trade-off we are doing here is less RAM and better transfer speeds with more CPU utilization (short period of time).

That said if you have an idea to improve this, please post it here

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to use https://github.com/EmbarkStudios/gsutil. That should consume fewer resources, but I could get it working consistently.

@jenting
Copy link
Contributor

jenting commented Jul 5, 2022

I think this change deserve a release note.

Code LGTM.

Copy link
Contributor

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

LGTM
It works on gen51 and is working charming.

@roboquat roboquat merged commit ad14c17 into main Jul 5, 2022
@roboquat roboquat deleted the aledbf/gs branch July 5, 2022 23:42
@mustard-mh mustard-mh mentioned this pull request Jul 6, 2022
1 task
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/L team: workspace Issue belongs to the Workspace team
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants