Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-18 09:08:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-18 09:08:32 +0300
commit55e0080f9d6b971145ee95c62dbb65feacaa93f8 (patch)
tree0d9db86b8745512327d1c35edc7375f7378199a8 /doc/ci
parent962afb3da11a72c7fca322378886b2c0be9f3385 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci')
-rw-r--r--doc/ci/runners/saas/linux_saas_runner.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/ci/runners/saas/linux_saas_runner.md b/doc/ci/runners/saas/linux_saas_runner.md
index a1864c59d47..e693c6ae5c1 100644
--- a/doc/ci/runners/saas/linux_saas_runner.md
+++ b/doc/ci/runners/saas/linux_saas_runner.md
@@ -101,6 +101,43 @@ SaaS runner instances are provisioned with a 25 GB storage volume. The underlyin
is shared by the operating system, the Docker image, and a copy of your cloned repository.
This means that the available free disk space that your jobs can use is **less than 25 GB**.
+## RAM disk (tmpfs)
+
+If your workloads generate a lot of disk input/output, you can run them from a RAM disk instead.
+
+Add a `tmpfs` mount point as part of your CI job, and ensure that these operations run from that location:
+
+```yaml
+myjob:
+ before_script:
+ - mkdir -p mount/point
+ - mount -t tmpfs -o size=1G tmpfs mount/point
+```
+
+`tmpfs` stores any data written in RAM, and is paged out to swap if necessary, which generates input/output.
+To avoid this I/O, ensure that the combined memory needed by the workload plus the data written to `tmpfs` does not exceed
+the amount of RAM in the [runner machine type](#machine-types-available-for-private-projects-x86-64)
+selected for the job.
+
+The `free` command can be used to observe the state of memory use and potentially help explain why jobs
+intermittently run slowly or fail.
+
+```yaml
+ script:
+ - run_tests --workdir mount/point/
+ - free
+```
+
+If `buff/cache` is lower than normal or there is any swap used, this suggests that the server was under
+memory pressure. In the following example, `Swap: used` is not zero, and additionally
+compares `buff/cache` to a job which ran without any issues.
+
+```plaintext
+ total used free shared buff/cache available
+Mem: 4396380 334028 3678404 3884 383948 3799128
+Swap: 1048572 69632 978940
+```
+
## Pre-clone script (deprecated)
WARNING: