Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to make Jenkins container use more of my host's memory?

33 views
Skip to first unread message

zil...@gmail.com

unread,
Jul 26, 2024, 1:08:12 AM7/26/24
to Jenkins Users
I have an AWS EC2 box with 32GB host memory. I run Jenkins as a container, like this, hoping to use 24/32 GB of memory.

docker run --restart=unless-stopped -d -p 8080:8080 -v /home/jenkins:/var/jenkins_home --name jenkins_master --memory=24GB 0123456789.dkr.ecr.us-east-1.amazonaws.com/jenkins_master:lts

Notice the --memory 24GB option. However, when I look in the Dashboard->Monitoring menu, I see the following memory usage, were Jenkins is only using 8GB.


Java memory used:

1,270 Mb / 8,192 Mb   

Obviously I'm using the wrong setting. How can I make Jenkins use 24GB?

Thanks!

zil...@gmail.com

unread,
Jul 26, 2024, 1:18:01 AM7/26/24
to Jenkins Users
Like always, I ask the question then I find the answer, which is

docker run --restart=unless-stopped -d -p 8080:8080 -v /home/jenkins:/var/jenkins_home --name jenkins_master --env JAVA_OPTS="-Xms24g -Xmx24g" 0123456789.dkr.ecr.us-east-1.amazonaws.com/jenkins_master:lts



Reply all
Reply to author
Forward
0 new messages