-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add switch to make a swap file #1751
Add switch to make a swap file #1751
Conversation
Also even with this on, when used with the free disk space switch, there is a net gain in disk space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Mike! 🙏
Wonder if we could customize the size here
Co-authored-by: jakirkham <[email protected]>
news/make_swap.rst
Outdated
|
||
**Changed:** | ||
|
||
* Create toggle to make a 10G swap file on the default linux image on Azure Pipelines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update this
Looks like it accepts these units:
I do like the idea of letting users just set it, I will add a note in the docs on how to use it. |
Co-authored-by: jakirkham <[email protected]>
…amed 'str' found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also add a default like "0GiB"
in this config section
conda-smithy/conda_smithy/configure_feedstock.py
Line 1714 in e938e8f
"azure": { |
Co-authored-by: jakirkham <[email protected]>
Sorry for all the weird suggestions, I was on my phone 🙃 |
No worries. Could you please also add a default like conda-smithy/conda_smithy/configure_feedstock.py Line 1714 in e938e8f
|
…tch' into feat/add_mkswap_switch
I think I did that correctly |
Thoughts @conda-forge/core ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. Given the current logic a swapfile would always be made. Don't we want it to not run unless the size is great than zero?
If we're making a new switch for swap files, it would probably make sense to tie this in with conda-forge/conda-forge-ci-setup-feedstock#155 / conda-forge/conda-forge-ci-setup-feedstock#158, which is currently activated by:
I had an unmerged PR that would have allowed setting the size too, if we want to match it in capabilities with linux. Not sure about where the PowerShell script would have to live, but IIUC, conda-smithy would just generate the call in |
Co-authored-by: jakirkham <[email protected]>
@h-vetinari do you think we should combine this with that other work now or is this more of something to do in the future? |
Also re testing this: Here is a commit after I ran the rendering without setting the size of the file conda-forge/dgl-feedstock@25c6e87 And here I set the size conda-forge/dgl-feedstock@0a5b406 And here we have the result conda-forge/dgl-feedstock@edeb18f |
Thanks Mike! 🙏 Sorry for asking this after the work above (thought I had already written this question) Is it possible that we might want different swap file sizes on Linux & Windows? If so, would there be value in having these be different config values? Should add these questions are for everyone on this thread (or outside of it that have interest) |
That is a good point, I was trying to lean into the comment here #1751 (comment) for it to be a single api entry point (if you want to call it that). Personally, I think a It might be nice for them to be separate since it would be silly to get into a situation where you need swap on Linux, but more disk space on Windows, and are kinda stuck with only one knob to turn. |
Thanks a lot for this PR @mikemhenry! We tried it out in conda-forge/polars-feedstock#161 and it works great 🤩 hope this gets merged soon :) |
Latest test here: conda-forge/dgl-feedstock@42e53d9 |
This is working for me, I am not sure why CI is failing now:
|
@jakirkham any ideas? |
Maybe it was a fluke? Restarting CI |
Co-authored-by: jakirkham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Mike and everyone for the reviews! 🙏
Doc entry is here conda-forge/conda-forge.github.io#1988 |
Any last thoughts on this addition? |
Thanks all! 🙏 If anything else comes up, please raise an issue and we can follow up there |
I found that while working on conda-forge/staged-recipes#22691 I needed to create a swap file for the build to complete since it exhausted the host memory.
Checklist
news
entry