karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Pieber <anpie...@gmail.com>
Subject Re: setting default memory values in karaf.bat
Date Thu, 18 Aug 2011 11:35:04 GMT
Yes, and still there are various things you must configure during startup
like memory, e.g. konsole name (in windows), jvm commands and various other
things. IMHO we do not configure (currently) anything via the bash/bat files
which could be done via configuration files in etc; but feel free to correct
me. I'm absolutely with you that we should move anything which can be
configured in etc/* there!

Kind regards,
Andreas

On Thu, Aug 18, 2011 at 13:27, Glen Mazza <gmazza@talend.com> wrote:

> I would guess only the JVM-level settings should be system environment
> variables, because those are not configurable using config files in the /etc
> directory (because Karaf has already started up with whatever JVM settings
> by the time it can read those files.)  Besides that, keeping config in the
> /etc files instead of a dual system environment - /etc file setup would
> probably be less confusing for users and less error-prone as well.
>
> Glen
>
>
> On 8/18/2011 2:25 AM, Andreas Pieber wrote:
>
>> Hey Glen,
>>
>> TBH I've just adapted the behavior of the linux startup script to windows.
>> IMHO it's a little bit more complex than simply adding KARAF_OPTS (btw,
>> KARAF_OPTS is already there but used in a different way then what you
>> proposed. IMHO we should rather start be writing down which could be
>> configured by system vars right now for 2.2.x. Based on that we can decide
>> what we would like to change/adapt for 3.x
>>
>> WDYT?
>>
>> Kind regards,
>> Andreas
>>
>> On Thu, Aug 18, 2011 at 06:13, Glen Mazza<gmazza@talend.com>  wrote:
>>
>>  I wonder if it might be better to have a KARAF_OPTS environment variable
>>> just like there is a CATALINA_OPTS one for the below memory settings for
>>> Tomcat.  That would have the benefit of allowing the user to specify
>>> default
>>> memory values for Karaf specifically without needing to set them at the
>>> JVM
>>> level (affecting everything else) in order for karaf.bat to pick them
>>> up--same benefit Tomcat users have with CATALINA_OPTS.
>>>
>>> Definition of CATALINA_OPTS (in catalina.bat):
>>> rem   CATALINA_OPTS   (Optional) Java runtime options used when the
>>> "start",
>>> rem                   "run" or "debug" command is executed.
>>> rem                   Include here and not in JAVA_OPTS all options, that
>>> should
>>> rem                   only be used by Tomcat itself, not by the stop
>>> process,
>>> rem                   the version command etc.
>>> rem                   Examples are heap size, GC logging, JMX ports etc.
>>>
>>> How it's implemented:
>>> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
>>> -Djava.endorsed.dirs="%JAVA_****ENDORSED_DIRS%" -classpath "%CLASSPATH%"
>>> -Dcatalina.base="%CATALINA_****BASE%" -Dcatalina.home="%CATALINA_****
>>> HOME%"
>>> -Djava.io.tmpdir="%CATALINA_****TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
>>> %ACTION%
>>> goto end
>>>
>>> Regards,
>>> Glen
>>>
>>> On 8/17/2011 1:30 PM, pieber@apache.org wrote:
>>>
>>>  Author: pieber
>>>> Date: Wed Aug 17 17:30:01 2011
>>>> New Revision: 1158844
>>>>
>>>> URL: http://svn.apache.org/viewvc?****rev=1158844&view=rev<http://svn.apache.org/viewvc?**rev=1158844&view=rev>
>>>> <http://**svn.apache.org/viewvc?rev=**1158844&view=rev<http://svn.apache.org/viewvc?rev=1158844&view=rev>
>>>> >
>>>>
>>>> Log:
>>>> [KARAF-818] Allow JAVA_MAX_MEM, JAVA_PERM_MEM, JAVA_MIN_MEM,
>>>> JAVA_MAX_PERM_MEM for karaf.bat
>>>>
>>>> (cherry picked from commit 0eba443be8758cf0b025dd34b09ecb**
>>>> **f1f11ae354)
>>>>
>>>>
>>>> Signed-off-by: Andreas Pieber<anpieber@gmail.com>
>>>>
>>>> Modified:
>>>>     karaf/trunk/assemblies/apache-****karaf/src/main/distribution/****
>>>> windows-text/bin/karaf.bat
>>>>
>>>> Modified: karaf/trunk/assemblies/apache-**
>>>> **karaf/src/main/distribution/****
>>>> windows-text/bin/karaf.bat
>>>> URL: http://svn.apache.org/viewvc/****karaf/trunk/assemblies/**
>>>> apache-**<http://svn.apache.org/viewvc/**karaf/trunk/assemblies/apache-**>
>>>> karaf/src/main/distribution/****windows-text/bin/karaf.bat?**
>>>> rev=1158844&r1=1158843&r2=**1158844&view=diff<http:**
>>>> //svn.apache.org/viewvc/karaf/**trunk/assemblies/apache-karaf/**
>>>> src/main/distribution/windows-**text/bin/karaf.bat?rev=**
>>>> 1158844&r1=1158843&r2=1158844&**view=diff<http://svn.apache.org/viewvc/karaf/trunk/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat?rev=1158844&r1=1158843&r2=1158844&view=diff>
>>>> >
>>>>
>>>> ==============================****============================**==**
>>>> ==================
>>>> --- karaf/trunk/assemblies/apache-****karaf/src/main/distribution/**
>>>> **windows-text/bin/karaf.bat
>>>> (original)
>>>> +++ karaf/trunk/assemblies/apache-****karaf/src/main/distribution/**
>>>> **windows-text/bin/karaf.bat
>>>> Wed Aug 17 17:30:01 2011
>>>> @@ -33,6 +33,24 @@ if not "%KARAF_TITLE%" == "" (
>>>>      title Karaf
>>>>  )
>>>>
>>>> +rem Check/Set up some easily accessible MIN/MAX params for JVM mem
>>>> usage
>>>> +
>>>> +if "%JAVA_MIN_MEM%" == "" (
>>>> +    set JAVA_MIN_MEM=128M
>>>> +)
>>>> +
>>>> +if "%JAVA_MAX_MEM%" == "" (
>>>> +    set JAVA_MAX_MEM=512M
>>>> +)
>>>> +
>>>> +if "%JAVA_PERM_MEM%" == "" (
>>>> +    set JAVA_PERM_MEM=16M
>>>> +)
>>>> +
>>>> +if "%JAVA_MAX_PERM_MEM%" == "" (
>>>> +    set JAVA_MAX_PERM_MEM=64M
>>>> +)
>>>> +
>>>>  goto BEGIN
>>>>
>>>>  :warn
>>>> @@ -73,7 +91,7 @@ if "%KARAF_DATA%" == "" (
>>>>  )
>>>>
>>>>  set LOCAL_CLASSPATH=%CLASSPATH%
>>>> -set DEFAULT_JAVA_OPTS=-server -Xmx512M -Dderby.system.home="%KARAF_***
>>>> *DATA%\derby"
>>>> -Dderby.storage.****fileSyncTransactionLog=true
>>>> -Dcom.sun.management.jmxremote
>>>> +set DEFAULT_JAVA_OPTS=-server -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM%
>>>> -XX:PermSize=%JAVA_PERM_MEM% -XX:MaxPermSize=%JAVA_MAX_****PERM_MEM%
>>>> -Dderby.system.home="%KARAF_****DATA%\derby" -Dderby.storage.****
>>>> fileSyncTransactionLog=true
>>>> -Dcom.sun.management.jmxremote
>>>>  set CLASSPATH=%LOCAL_CLASSPATH%;%****KARAF_BASE%\conf
>>>>  set DEFAULT_JAVA_DEBUG_OPTS=-****Xdebug -Xnoagent -Djava.compiler=NONE
>>>> -Xrunjdwp:transport=dt_socket,****server=y,suspend=n,address=****5005
>>>>
>>>>
>>>>
>>>>
>>>>  --
>>> Glen Mazza
>>> Software Engineer, Talend (http://www.talend.com)
>>> blog: http://www.jroller.com/gmazza
>>>
>>>
>>>
>>>
>
> --
> Glen Mazza
> Software Engineer, Talend (http://www.talend.com)
> blog: http://www.jroller.com/gmazza
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message