docs icon indicating copy to clipboard operation
docs copied to clipboard

(#786) Set required memory for container

Open pauby opened this issue 2 years ago • 6 comments

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

  • [ ] I have previewed these changes using the Docker Container or another method before submitting this pull request.

Change Types Made

  • [ ] Minor documentation fix (typos etc.).
  • [ ] Major documentation change (refactoring, reformatting or adding documentation to existing page).
  • [ ] New documentation page added.
  • [ ] The change I have made should have a video added, and I have raised an issue for this.
    • Issue #

Change Checklist

  • [ ] Requires a change to menu structure (top or left hand side)/
  • [ ] Menu structure has been updated

Related Issue

Fixes #786

pauby avatar Jul 21 '23 09:07 pauby

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) 👍

corbob avatar Jul 21 '23 14:07 corbob

Based on what you said, do we bump this from 4GB to 8GB?

pauby avatar Jul 21 '23 15:07 pauby

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.

corbob avatar Jul 21 '23 15:07 corbob

I've updated to use 8GB.

pauby avatar Jul 21 '23 16:07 pauby

OK, Codespaces are hurting my brain. To my knowledge, all of the ones I create say they're being created under corbob, but with the memory set to 8, I get this message regarding not being an applicable SKU: image

When I try to create any codespace, I have two options, one 2 core with 4 GB memory, and the other 4 core with 8GB memory. Would it make sense to try setting cpus to 4 and memory to 8gb? 2023-07-21_09-53-53

corbob avatar Jul 21 '23 16:07 corbob

@corbob @pauby this PR seems to have been forgotten about.

Can either of you please provide an update here on what needs to be done to get this completed?

gep13 avatar Nov 27 '23 09:11 gep13

Based on @corbob comment above I've added cpus and rebased. @gep13 this is ready for review / merge.

pauby avatar Jun 01 '24 13:06 pauby

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.

gep13 avatar Jun 01 '24 14:06 gep13