You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "BURN, James" <Ja...@oup.com> on 2014/10/15 11:42:12 UTC

Unable to change JVM settings with wrapper/Karaf

Hi

We're running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We've 8Gb on the VM and I'm trying to increase the amount of memory allocated to the JVM. I changed the memory in KARAF-service.conf file which was generated through installing wrapper in ServiceMix to wrapper.java.maxmemory=6244

However, when I restart Karaf I am set -Xmx4096m in startup.  This appears to be some sort of upper limit; if I put
wrapper.java.maxmemory=2048
this correctly sets -Xmx2048m in startup.

I can start ServiceMix directly and edit /etc/bin/setenv to allocate more memory, but then lose the functionality of wrapper.

Any thoughts?

James



RE: Unable to change JVM settings with wrapper/Karaf

Posted by "BURN, James" <Ja...@oup.com>.
Achim/JB

Thanks both for your advice/info.

I think I'll ditch the Wrapper component and cobble together my own Linux daemon start/stop script.

Ho hum.

James

-----Original Message-----
From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
Sent: 15 October 2014 11:23
To: user@karaf.apache.org
Subject: Re: Unable to change JVM settings with wrapper/Karaf

It may be related by the JSW version that we use.

You can create your own Karaf RC service (by scripting).

By the way, I have a prototype (again ;)) of the replacement of JSW by commons-daemon.

Regards
JB

Hi, 

this might be because we are using a "rather old version" of the Service wrapper, as it's the latest version which is ASL2 compliant. 
So this might be the issue as it used to be restricted to 4GB max I think. 

We're not allowed to ship with a newer version of this Tanuki Service Wrapper due to the licensing. I don't know about exchanging that on your side though. 

Regards, Achim

On 10/15/2014 12:14 PM, BURN, James wrote:
> Hi
>
> I've had edited wrapper.conf by increasing the wrapper.java.maxmemory=xx setting but this reaches a limit of 4096m.
>
> I want to go above this, but can't do so using the wrapper so used bin/start to start Karaf and changed /bin/setenv. I would like to use the wrapper ideally however.
>
> My colleagues pointed out that 4096m seems suspiciously like the limit imposed by a 32bit environment. However, I'm on a 64 bit VM using /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java to start.
>
> Could there be something hardcoded in wrapper which limits the possible memory allocation?
>
> James
>
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Sent: 15 October 2014 10:59
> To: user@karaf.apache.org
> Subject: Re: Unable to change JVM settings with wrapper/Karaf
>
> Hi James,
>
> the wrapper conf is used only when you use the init script generated (and supposed to be copied in /etc/init.d).
> bin/setenv is not used by the wrapper, but by bin/karaf or bin/start script.
>
> Regards
> JB
>
> On 10/15/2014 11:42 AM, BURN, James wrote:
>> Hi
>>
>>
>> We're running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We've 8Gb 
>> on the VM and I'm trying to increase the amount of memory allocated 
>> to the JVM. I changed the memory in KARAF-service.conf file which was 
>> generated through installing wrapper in ServiceMix to
>> wrapper.java.maxmemory=6244
>>
>> However, when I restart Karaf I am set -Xmx4096m in startup.  This 
>> appears to be some sort of upper limit; if I put
>>
>> wrapper.java.maxmemory=2048
>>
>> this correctly sets -Xmx2048m in startup.
>>
>> I can start ServiceMix directly and edit /etc/bin/setenv to allocate 
>> more memory, but then lose the functionality of wrapper.
>>
>>
>> Any thoughts?
>>
>> James
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Unable to change JVM settings with wrapper/Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It may be related by the JSW version that we use.

You can create your own Karaf RC service (by scripting).

By the way, I have a prototype (again ;)) of the replacement of JSW by 
commons-daemon.

Regards
JB

On 10/15/2014 12:14 PM, BURN, James wrote:
> Hi
>
> I've had edited wrapper.conf by increasing the wrapper.java.maxmemory=xx setting but this reaches a limit of 4096m.
>
> I want to go above this, but can't do so using the wrapper so used bin/start to start Karaf and changed /bin/setenv. I would like to use the wrapper ideally however.
>
> My colleagues pointed out that 4096m seems suspiciously like the limit imposed by a 32bit environment. However, I'm on a 64 bit VM using /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java to start.
>
> Could there be something hardcoded in wrapper which limits the possible memory allocation?
>
> James
>
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Sent: 15 October 2014 10:59
> To: user@karaf.apache.org
> Subject: Re: Unable to change JVM settings with wrapper/Karaf
>
> Hi James,
>
> the wrapper conf is used only when you use the init script generated (and supposed to be copied in /etc/init.d).
> bin/setenv is not used by the wrapper, but by bin/karaf or bin/start script.
>
> Regards
> JB
>
> On 10/15/2014 11:42 AM, BURN, James wrote:
>> Hi
>>
>>
>> We're running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We've 8Gb
>> on the VM and I'm trying to increase the amount of memory allocated to
>> the JVM. I changed the memory in KARAF-service.conf file which was
>> generated through installing wrapper in ServiceMix to
>> wrapper.java.maxmemory=6244
>>
>> However, when I restart Karaf I am set -Xmx4096m in startup.  This
>> appears to be some sort of upper limit; if I put
>>
>> wrapper.java.maxmemory=2048
>>
>> this correctly sets -Xmx2048m in startup.
>>
>> I can start ServiceMix directly and edit /etc/bin/setenv to allocate
>> more memory, but then lose the functionality of wrapper.
>>
>>
>> Any thoughts?
>>
>> James
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Unable to change JVM settings with wrapper/Karaf

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

this might be because we are using a "rather old version" of the Service
wrapper, as it's the latest version which is ASL2 compliant.
So this might be the issue as it used to be restricted to 4GB max I think.

We're not allowed to ship with a newer version of this Tanuki Service
Wrapper due to the licensing. I don't know about exchanging that on your
side though.

Regards, Achim



2014-10-15 12:14 GMT+02:00 BURN, James <Ja...@oup.com>:

> Hi
>
> I've had edited wrapper.conf by increasing the wrapper.java.maxmemory=xx
> setting but this reaches a limit of 4096m.
>
> I want to go above this, but can't do so using the wrapper so used
> bin/start to start Karaf and changed /bin/setenv. I would like to use the
> wrapper ideally however.
>
> My colleagues pointed out that 4096m seems suspiciously like the limit
> imposed by a 32bit environment. However, I'm on a 64 bit VM using
> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java to start.
>
> Could there be something hardcoded in wrapper which limits the possible
> memory allocation?
>
> James
>
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Sent: 15 October 2014 10:59
> To: user@karaf.apache.org
> Subject: Re: Unable to change JVM settings with wrapper/Karaf
>
> Hi James,
>
> the wrapper conf is used only when you use the init script generated (and
> supposed to be copied in /etc/init.d).
> bin/setenv is not used by the wrapper, but by bin/karaf or bin/start
> script.
>
> Regards
> JB
>
> On 10/15/2014 11:42 AM, BURN, James wrote:
> > Hi
> >
> >
> > We're running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We've 8Gb
> > on the VM and I'm trying to increase the amount of memory allocated to
> > the JVM. I changed the memory in KARAF-service.conf file which was
> > generated through installing wrapper in ServiceMix to
> > wrapper.java.maxmemory=6244
> >
> > However, when I restart Karaf I am set -Xmx4096m in startup.  This
> > appears to be some sort of upper limit; if I put
> >
> > wrapper.java.maxmemory=2048
> >
> > this correctly sets -Xmx2048m in startup.
> >
> > I can start ServiceMix directly and edit /etc/bin/setenv to allocate
> > more memory, but then lose the functionality of wrapper.
> >
> >
> > Any thoughts?
> >
> > James
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

RE: Unable to change JVM settings with wrapper/Karaf

Posted by "BURN, James" <Ja...@oup.com>.
Hi

I've had edited wrapper.conf by increasing the wrapper.java.maxmemory=xx setting but this reaches a limit of 4096m.

I want to go above this, but can't do so using the wrapper so used bin/start to start Karaf and changed /bin/setenv. I would like to use the wrapper ideally however.

My colleagues pointed out that 4096m seems suspiciously like the limit imposed by a 32bit environment. However, I'm on a 64 bit VM using /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java to start.

Could there be something hardcoded in wrapper which limits the possible memory allocation?

James


-----Original Message-----
From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
Sent: 15 October 2014 10:59
To: user@karaf.apache.org
Subject: Re: Unable to change JVM settings with wrapper/Karaf

Hi James,

the wrapper conf is used only when you use the init script generated (and supposed to be copied in /etc/init.d).
bin/setenv is not used by the wrapper, but by bin/karaf or bin/start script.

Regards
JB

On 10/15/2014 11:42 AM, BURN, James wrote:
> Hi
>
>
> We're running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We've 8Gb 
> on the VM and I'm trying to increase the amount of memory allocated to 
> the JVM. I changed the memory in KARAF-service.conf file which was 
> generated through installing wrapper in ServiceMix to 
> wrapper.java.maxmemory=6244
>
> However, when I restart Karaf I am set -Xmx4096m in startup.  This 
> appears to be some sort of upper limit; if I put
>
> wrapper.java.maxmemory=2048
>
> this correctly sets -Xmx2048m in startup.
>
> I can start ServiceMix directly and edit /etc/bin/setenv to allocate 
> more memory, but then lose the functionality of wrapper.
>
>
> Any thoughts?
>
> James
>

--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Unable to change JVM settings with wrapper/Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi James,

the wrapper conf is used only when you use the init script generated 
(and supposed to be copied in /etc/init.d).
bin/setenv is not used by the wrapper, but by bin/karaf or bin/start script.

Regards
JB

On 10/15/2014 11:42 AM, BURN, James wrote:
> Hi
>
>
> We’re running ServiceMix 5.1.1 (Karaf 2.3.4) under wrapper. We’ve 8Gb on
> the VM and I’m trying to increase the amount of memory allocated to the
> JVM. I changed the memory in KARAF-service.conf file which was generated
> through installing wrapper in ServiceMix to wrapper.java.maxmemory=6244
>
> However, when I restart Karaf I am set -Xmx4096m in startup.  This
> appears to be some sort of upper limit; if I put
>
> wrapper.java.maxmemory=2048
>
> this correctly sets –Xmx2048m in startup.
>
> I can start ServiceMix directly and edit /etc/bin/setenv to allocate
> more memory, but then lose the functionality of wrapper.
>
>
> Any thoughts?
>
> James
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com