apache / apache/maven-mvnd

How to optimize the speed of jenkins integrated mvnd compilation jar file in docker container

Open
#1,295 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
3.5k
Forks
250
Avg merge
16h 22m
Merged PRs (30d)
36

Description

### New feature, improvement proposal

Deploy the Jenkins 2.4.8.1 container using Docker. Configure the environment variable mvnd within the container. Executing `mvnd -v` inside the container will create a daemon process. The following is the mvnd.properties :configuration: mvnd.keepAlive = 60000 ms
mvnd.minHeapSize = 256M
mvnd.maxHeapSize = 512M
mvnd.jvmArgs=-Xmx512m -Xms256m
mvnd.minThreads = 4
mvnd.threads=4
mvnd.minIdleDaemons=2
mvnd.idleTimeout=2147483647
mvnd.duplicateDaemonGracePeriod = 3600 seconds
mvnd.expirationCheckDelay = 60 seconds

I found that only when the daemon process is created in advance (`mvnd -v` is executed in advance within the container), will the mvnd compilation speed triggered by the Jenkins pipeline be faster under the same memory.
mvnd -Dmvnd.socketConnectTimeout=300000 -Dmvnd.connectTimeout=300000 -Dmvnd.cancelConnectTimeout=300000 -Dmaven.compile.fork=true -Dmvnd.cache=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true clean package

Question 1: Why is the compilation speed of the daemon process temporarily created in the Jenkins pipeline slow, and why is it destroyed after compilation?
Question 2: How should I configure to make the speed of compiling JAR files stable and prevent the daemon process from occupying the container content for a long time?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Docker deployment details, the listed mvnd.properties settings, and the Jenkins pipeline command in the issue. Investigate why a daemon started by mvnd -v changes compilation speed and why the pipeline-created daemon exits; done means documenting or identifying a configuration that gives stable compilation speed without indefinite container occupation.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.