-
Notifications
You must be signed in to change notification settings - Fork 88
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
singularity overlay create: support sparse ext3 images #610
Comments
We'd happily accept a PR for this as a flag. I tend think that by default consuming all required space up-front is generally a good thing, as a large proportion of singularity users are often working in quota limited spaces, so creating a large sparse file might not gain much as it can 'hide' the quota / ext3 size limits. I am quite interested in why you would be using an image file in the TBs however? |
I'm not that familiar with golang, but if I find some spare time I can have a go at it (I guess there's a bad pun in there somewhere...)
On the other hand, a quota-limited space could also be a motivator for using sparse files. Unless the user is copying a known fixed-size data to an overlay ext3 file system, they'd create an image that's some degree larger than what they need---which would actually consume the extra quota'ed storage space if the image is non-sparse.
There are some bioinformatics applications (and probably applications from other domains as well) that generate & access a large numbers of smallish files during execution; these can perform poorly on a parallel file system like Lustre (and strain the Lustre metadata server). Dealing with lots o' little files in a writable overlay file system image can improve performance & keep Lustre usable for other users (e.g., see examples for Trinity & Cactus). |
@nathanweeks I can do this! Can you show me what the truncate interaction should look like (if you were doing it on the command line?) |
this will close issue sylabs#610. We basically want to add support for a sparse overlay, and we can do that by using truncate -s (size) instead of dd. In the case the command is not found, an error is issued and the user can decide to install or not use it. I think it would be overkill to hard code information about all OS versions / support but if anyone has ideas for how to reasonably do this we can return a more specific error message. I am not running the e2e tests locally but will see how they do in the CI! :) Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Thank you! I miss developing in Go so I’m eager to work on little things here to get it! Definitely ping me for said little things, of course after the addition is +1 by the project leads. And hopefully as I get better acquainted with the code and testing I’ll become more proficient at it. 😆 |
this will close issue sylabs/singularity#610. We basically want to add support for a sparse overlay, and we can do that by using truncate -s (size) instead of dd. In the case the command is not found, an error is issued and the user can decide to install or not use it. I think it would be overkill to hard code information about all OS versions / support but if anyone has ideas for how to reasonably do this we can return a more specific error message. I am not running the e2e tests locally but will see how they do in the CI! :) Signed-off-by: vsoch <vsoch@users.noreply.github.com> Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
this will close issue sylabs/singularity#610. We basically want to add support for a sparse overlay, and we can do that by using truncate -s (size) instead of dd. In the case the command is not found, an error is issued and the user can decide to install or not use it. I think it would be overkill to hard code information about all OS versions / support but if anyone has ideas for how to reasonably do this we can return a more specific error message. I am not running the e2e tests locally but will see how they do in the CI! :) Signed-off-by: vsoch <vsoch@users.noreply.github.com> Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
Is your feature request related to a problem? Please describe.
Filling up the ext3 file system in an overlay image file can cause applications to fail at runtime. To prevent this from occurring, it's useful to over-provision the size of the ext3 file system. However,
singularity overlay create --size <size> <ext3_image_file>
creates only non-sparse image files, so the user immediately realizes the maximum cost in terms of disk usage vs. sparse image files (in addition to the extra time & I/O spent upfront to create the image, which can be nontrivial for image files in the TBs)Describe the solution you'd like
Add a
singularity overlay create --sparse
option (applicable only when creating a new ext3 file system image, not when embedding a writable overlay in an existing SIF)Describe alternatives you've considered
This could otherwise be done in several steps, following the directions in the SingularityCE user guide's Create an overlay image (< 3.8), replacing
dd
withtruncate -s
, but it would be more convenient for the end user to have this capability as an option tosingularity overlay create
(particularly when used in conjunction with--create-dir
, which otherwise with themkdir
/truncate
/mkfs.ext3
approach requires the user to know to usemkdir overlay/work/<dir>
)The text was updated successfully, but these errors were encountered: