raise host-shared file size limits to 50MB#715
Merged
Conversation
bump the per-file copy caps for app-compose.json and .user-config from 256KB/1MB to 50MB in HostShared::copy, and grow the vhd shared disk from 8MB to 128MB so it can still hold the larger files plus FAT32 overhead.
Contributor
There was a problem hiding this comment.
Pull request overview
Raises the maximum allowed sizes for host-shared app-compose.json and .user-config so larger deployment configurations can be delivered into a dstack CVM, and increases the vhd host-share transport disk size to accommodate the larger payloads.
Changes:
- Increase guest-side host-shared copy caps for
app-compose.jsonand.user-configto 50 MiB each. - Increase the
vhd-mode in-memory FAT32 disk image size from 8 MiB to 128 MiB.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
vmm/src/app/qemu.rs |
Enlarges the vhd-mode FAT32 shared disk image to fit larger host-shared files. |
dstack-util/src/system_setup.rs |
Raises per-file max size limits when copying host-shared files into the guest work directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+146
to
150
| // Must be large enough to hold all host-shared files (app-compose.json and | ||
| // .user-config can each be up to 50 MB, see HostShared::copy) plus FAT32 overhead. | ||
| const DISK_SIZE: usize = 128 * 1024 * 1024; | ||
| let mut disk_data = vec![0u8; DISK_SIZE]; | ||
|
|
Comment on lines
+146
to
+147
| // Must be large enough to hold all host-shared files (app-compose.json and | ||
| // .user-config can each be up to 50 MB, see HostShared::copy) plus FAT32 overhead. |
address review feedback on PR #715: - back the vhd shared disk by a file (File::set_len) and stream files in via io::copy instead of building the whole 128MiB image plus per-file buffers in memory, keeping peak RSS bounded during VM start - use MiB consistently in the DISK_SIZE comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
To support small, self-contained applications that ship their content inline instead of pulling images/assets from a Docker registry. With everything embedded directly in the compose / user-config, these files can grow well beyond the previous caps, so the host-shared size limits need to be raised.
What
Raise the size limits for files shared from the host into a dstack CVM, so larger
app-compose.jsonand.user-configfiles are supported.Changes
dstack-util/src/system_setup.rs— inHostShared::copy, bump the per-file copy caps:app-compose.json: 256 KB → 50 MB.user-config: 1 MB → 50 MB.sys-config.json32 KB,.instance_info10 KB,.encrypted-env256 KB — unchanged)vmm/src/app/qemu.rs— grow thevhd-mode shared FAT32 disk from 8 MB → 128 MB so it can still hold the larger files (2×50 MB worst case) plus FAT32 overhead. The default9pmode is unaffected by this.Notes
host_share_modeis9p, which has no fixed transport-size limit; the vhd bump only matters whenhost_share_mode = "vhd".ra-rpc/src/rocket_helper.rs) on the VMMCreateVm/UpdateVm/UpgradeApp/GetComposeHashmethods that carrycompose_file/user_config. That is not changed here — it is overridable per-deployment via Rocket's[limits]config and was intentionally left out of this PR.