I have a question regarding memory allocation for parallel steps.
From my understanding, running steps in parallel will spin up an individual container per each step, meaning in our setup we would have 12 containers running at the same time. For 2/12 of these we have defined `size: 2x` in the `definitions` section of our pipeline.yaml. So defining size 2x we would get up to 8 GB for the build container, for the ones without size: 2x half of that, so 4 GB
Now if we inspect the memory logs that are being written for each of the 12 containers (also the ones with size 2x), we always get logging along the lines of
Mon Jun 20 12:04:51 UTC 2022
Memory usage in megabytes:
3903
Mon Jun 20 12:05:21 UTC 2022
Memory usage in megabytes:
3896
Mon Jun 20 12:05:51 UTC 2022
Memory usage in megabytes:
3917
Mon Jun 20 12:06:21 UTC 2022
Memory usage in megabytes:
3754
Mon Jun 20 12:06:51 UTC 2022
Memory usage in megabytes:
3754
Mon Jun 20 12:07:21 UTC 2022
Memory usage in megabytes:
3735
Mon Jun 20 12:07:51 UTC 2022
Memory usage in megabytes:
3740
Now, to my actual question: Are these containers actually not requiring up to 7 GB of memory to run their script commands (hence the logs with <= 4GB) or are the containers somehow only getting up to 4 GB of memory - contrary to the size 2x definition. - or is there an entirely different issue at hand?
We initially tried to increase memory for some of these steps, as the scripts running inside the steps (end-to-end tests) will give weird results and/or fail randomly, essentually becoming flaky, while on local machines they run fine. However on local machines they are granted more than 3 GB of memory, which is why we tried to also increase memory during test runs in the pipeline
Sadly the size property and memory allocation for containers in the context of parallel steps is not documented that well.
Thanks in advance - help and or directing me to the proper documentation would be highly appreciated.
Best regards
Deniz