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

Optimize sharing for instances on the same stack #4260

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

nono
Copy link
Member

@nono nono commented Dec 13, 2023

When two instances are on the same stack and there is a sharing between for files, the stack can optimize the share-upload worker. Before this change, the content of the file was fetched from the VFS of the source instance, then uploaded to the destination instance, which copies it to its VFS. Now, the stack just makes a copy from one VFS to the other. It's a lot lighter on I/O, and should help making the share-upload worker faster.

@nono nono requested a review from a team as a code owner December 13, 2023 16:51
model/sharing/upload.go Show resolved Hide resolved
return err
}

return fd.Close()
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be defered in case we run into an error?

model/vfs/vfsswift/impl_v3.go Show resolved Hide resolved
model/vfs/vfsswift/impl_v3.go Show resolved Hide resolved
Copy link
Member

@taratatach taratatach left a comment

Choose a reason for hiding this comment

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

LGTM once the last comment is addressed.

When two instances are on the same stack and there is a sharing between
for files, the stack can optimize the share-upload worker. Before this
change, the content of the file was fetched from the VFS of the source
instance, then uploaded to the destination instance, which copies it to
its VFS. Now, the stack just makes a copy from one VFS to the other.
It's a lot lighter on I/O, and should help making the share-upload
worker faster.
@nono nono merged commit 349a71b into master Dec 28, 2023
6 checks passed
@nono nono deleted the optim-sharing-same-stack branch December 28, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants