Quantcast

Problems with JVM Parameters in Freestyle Jobs with Maven Builder

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Problems with JVM Parameters in Freestyle Jobs with Maven Builder

Markward Schubert
Hi Group!

Is there some known issue with JVM Parameters being ignored for Maven build steps in freestyle jobs? I have the following parameters set:

-XX:PermSize=128m -XX:MaxPermSize=512m -Xms512m -Xmx1g

It seems that these are ignored, because when I put -Xmx8g, the build runs as if i wrote 1g, although the machine has a total of about 4g of ram.
So I would expect the job to stop with a message, that i assigned more mem, than available.
The reason for me to investigate in this is, because after activating the checkstyle plugin, I start getting heapspace Exceptions and started to experiment with these settings.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problems with JVM Parameters in Freestyle Jobs with Maven Builder

mpapo - Michaël Pailloncy
Hi,

I think that Xmx is the maximal heap size and Xms the initial.
Your job does not appear to exceed your 4go of memory.
If you put -Xms8g, your job will certainly crash.

Michaël

2012/7/26 Markward Schubert <[hidden email]>
Hi Group!

Is there some known issue with JVM Parameters being ignored for Maven build steps in freestyle jobs? I have the following parameters set:

-XX:PermSize=128m -XX:MaxPermSize=512m -Xms512m -Xmx1g

It seems that these are ignored, because when I put -Xmx8g, the build runs as if i wrote 1g, although the machine has a total of about 4g of ram.
So I would expect the job to stop with a message, that i assigned more mem, than available.
The reason for me to investigate in this is, because after activating the checkstyle plugin, I start getting heapspace Exceptions and started to experiment with these settings.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problems with JVM Parameters in Freestyle Jobs with Maven Builder

Kanstantsin Shautsou
In reply to this post by Markward Schubert
Does it work for maven based jobs?
Looks like you can't set more memory for maven then you gave to jenkins process, because maven executes in parent jenkins java process.

2012/7/26 Markward Schubert <[hidden email]>
Hi Group!

Is there some known issue with JVM Parameters being ignored for Maven build steps in freestyle jobs? I have the following parameters set:

-XX:PermSize=128m -XX:MaxPermSize=512m -Xms512m -Xmx1g

It seems that these are ignored, because when I put -Xmx8g, the build runs as if i wrote 1g, although the machine has a total of about 4g of ram.
So I would expect the job to stop with a message, that i assigned more mem, than available.
The reason for me to investigate in this is, because after activating the checkstyle plugin, I start getting heapspace Exceptions and started to experiment with these settings.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problems with JVM Parameters in Freestyle Jobs with Maven Builder

Sami Tikka
That's not entirely accurate, I think.

I have a job that builds Jenkins. The job is a maven job and I have set "-XX:MaxPermSize=256m -Djava.awt.headless=true" into MAVEN_OPTS  under the Advanced button (in Build section). The build will fail without the permgen pool resize and also pop up some extra icons into the dock without the headless option. I'm definitely of the opinion Jenkins will launch a new JVM where it executes maven.

-- Sami

Kanstantsin Shautsou <[hidden email]> kirjoitti 30.7.2012 kello 0.40:

> Does it work for maven based jobs?
> Looks like you can't set more memory for maven then you gave to jenkins process, because maven executes in parent jenkins java process.
>
> 2012/7/26 Markward Schubert <[hidden email]>
> Hi Group!
>
> Is there some known issue with JVM Parameters being ignored for Maven build steps in freestyle jobs? I have the following parameters set:
>
> -XX:PermSize=128m -XX:MaxPermSize=512m -Xms512m -Xmx1g
>
> It seems that these are ignored, because when I put -Xmx8g, the build runs as if i wrote 1g, although the machine has a total of about 4g of ram.
> So I would expect the job to stop with a message, that i assigned more mem, than available.
> The reason for me to investigate in this is, because after activating the checkstyle plugin, I start getting heapspace Exceptions and started to experiment with these settings.
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problems with JVM Parameters in Freestyle Jobs with Maven Builder

Sami Tikka
In reply to this post by Markward Schubert
How exactly are you setting these parameters to your freestyle job? Could you copy-paste your entire build step here?

-- Sami

Markward Schubert <[hidden email]> kirjoitti 26.7.2012 kello 14.09:

> Hi Group!
>
> Is there some known issue with JVM Parameters being ignored for Maven build steps in freestyle jobs? I have the following parameters set:
>
> -XX:PermSize=128m -XX:MaxPermSize=512m -Xms512m -Xmx1g
>
> It seems that these are ignored, because when I put -Xmx8g, the build runs as if i wrote 1g, although the machine has a total of about 4g of ram.
> So I would expect the job to stop with a message, that i assigned more mem, than available.
> The reason for me to investigate in this is, because after activating the checkstyle plugin, I start getting heapspace Exceptions and started to experiment with these settings.
>
>

Loading...