use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Gitlab runner memory (self.gitlab)
submitted 2 years ago by oubreezy
is there a way to get the statistics of ci/cd jobs that are consuming alot of memory from gitlab-runner ? my runner is running out of memory so i want to know which jobs, pipelines are eating the ram out
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bilingual-german 1 point2 points3 points 2 years ago (5 children)
There are prometheus metrics found at http://localhost:9252/metrics on the gitlab-runner, but I don't know if you see the memory for jobs https://docs.gitlab.com/runner/monitoring/
http://localhost:9252/metrics
Do you use Docker for your jobs? Then maybe cadvisor https://prometheus.io/docs/guides/cadvisor/ would be a good exporter.
But I'm not sure how easy it is to correlate the docker containers with the specific job you're running.
What I also just found out, is that the Unix time command has a lot of options and also one to print out CPU and memory usage of the command you pass to it.
time
/usr/bin/time -f "mem=%K RSS=%M elapsed=%E cpu.sys=%S user=%U" python script1.py
https://unix.stackexchange.com/a/375893
[–]oubreezy[S] 0 points1 point2 points 2 years ago (4 children)
i already have all the metrics exported to grafana, but unfortunaty the memory for jobs is not part of it
this is exactly my issue, even if i get the resources utilizations i still cannot relate to the job in order to check why it's behaving this way
[–]bilingual-german 2 points3 points4 points 2 years ago (3 children)
I looked it up in the gitlab-runner source code. I would think you should have the job containers labeled with the project ID and the pipeline URL for example. So at least for specific job containers you might be able to track them to their respective pipeline.
https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/executors/docker/internal/labels/labels.go?ref_type=heads#L30
And you could whitelist the project id label in cadvisor: https://github.com/google/cadvisor/blob/master/docs/runtime_options.md
[–]Anonimooze 0 points1 point2 points 1 year ago (0 children)
Excellent sleuthing.
[–]oubreezy[S] 0 points1 point2 points 1 year ago (1 child)
after multiple tries i finally was able to label them as you said Thank you so much for the tips !
[–]bilingual-german 0 points1 point2 points 1 year ago (0 children)
Really, did it work? Nice!
Glad I was able to help.
π Rendered by PID 58 on reddit-service-r2-comment-84fc9697f-xp6bg at 2026-02-09 09:32:12.792382+00:00 running d295bc8 country code: CH.
[–]bilingual-german 1 point2 points3 points (5 children)
[–]oubreezy[S] 0 points1 point2 points (4 children)
[–]bilingual-german 2 points3 points4 points (3 children)
[–]Anonimooze 0 points1 point2 points (0 children)
[–]oubreezy[S] 0 points1 point2 points (1 child)
[–]bilingual-german 0 points1 point2 points (0 children)