-
Notifications
You must be signed in to change notification settings - Fork 165
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
(#786) Set required memory for container #791
Conversation
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 want to say also that 4GB is what the base codespace that I have uses, but when running locally 4GB is fine 🤔 .
For now I'd say we leave it with the 4, and once the parsing error is fixed up can run it in codespaces and confirm it works.
Looking closer at the docs, they show a whole collection of code spaces, while I only have two listed. Now I'm starting to wonder if the memory issue is intermittent and depends on if other codespaces are running at the same time 🤔
.devcontainer/devcontainer.json
Outdated
@@ -10,6 +10,9 @@ | |||
"NODE_VERSION": "16" | |||
} | |||
}, | |||
"hostRequirements": { | |||
"memory": "4gb" | |||
} |
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.
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.
Good catch. Fixed this.
So it looks like... In codespaces, the container when given 4GB idles at about 1700 MB of free memory... locally it idles at about 2000... This is only 300 MB so seems like it shouldn't really be a concern... However, when Statiq is previewing the site locally, the container has around 100 MB free 😂 Locally it also seems to dip into swap which codespaces is a constant 0. I'd be interested to see if bumping the memory to 8 GB resulted in adverse behaviours locally if you don't have the 8 GB assigned to docker. Edit: Locally I've bumped this to 8GB, and reduced docker to 1GB... and it doesn't complain at all about not having enough memory (the preview of course fails, but the dev container is otherwise fine with it) 👍 |
d8b0ecc
to
b082dbd
Compare
Based on what you said, do we bump this from 4GB to 8GB? |
@pauby I think so. At least for this PR, then can easily test that codespaces launches the proper container. |
b082dbd
to
406756a
Compare
I've updated to use 8GB. |
406756a
to
62884bb
Compare
62884bb
to
3458ed6
Compare
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
Happy to see this merged in for just now, this requirement will likely not be needed once @st3phhays has finished her upcoming work with Astro. |
Merge pull request #791 from pauby/maint/container-memory
Description Of Changes
Sets the required memory for the docs repo container to 4 GB. Note that this is the amount that I need to set it to. The issue #786 didn't specify a memory number.
Motivation and Context
Less than 4GB memory in the container, in my setup, causes the site not to build.
Testing
Change Types Made
Change Checklist
Related Issue
Fixes #786