karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Experiment to make karaf 4 smaller
Date Mon, 12 May 2014 13:43:05 GMT

On May 12, 2014, at 5:18 AM, Jean-Baptiste Onofré <jb@nanthrax.net> wrote:

> Hi guys,
> 
> as reminder, xercesImpl jar is in lib/endorsed only for IBM JDK (issue at startup with
Blueprint). As it may introduces some issue with Oracle JDK, I would like to double check
if xercesImpl is still required (I don't think so).

There is another reason it’s there: performance/scalability

The parser factories in the JDK do a System.getProperty for every parser created.   That’s
a synchronized call which, under load, can result in a bunch of threads blocking.   The Xerces
factory does not do that and can scale much better, particularly for lots of small XML messages.
  The DocumentFactory’s for creating new DOM Documents also suffer the same problem.

Dan



> We talked about "Karaf profiles" in the past to solve "custom distribution" issue at
both build and runtime.
> 
> The karaf maven plugin already provide ways to create custom distro.
> 
> Regards
> JB
> 
> On 05/12/2014 10:44 AM, Guillaume Nodet wrote:
>> I agree that the minimal distro should be smaller.
>> Though I think before removing anything, we need to have an easy way for
>> users to add them back.  I'm mostly thinking about equinox and xerces :
>>   * i don't think we have a simple way to switch an assembly to using
>> equinox using the maven plugin
>>   * cxf needs it afaik, and we add it
>> to org.osgi.framework.system.packages.extra in etc/config.properties
>> If we improve the maven plugin to support those things, we can remove those
>> from minimal I think.
>> For wrapper and additional features, the plugin already gives a simple way
>> to add them back, so we can already remove them I think.
>> 
>> 
>> 
>> 2014-05-11 17:50 GMT+02:00 Jean-Baptiste Onofré <jb@nanthrax.net>:
>> 
>>> Hi Christian,
>>> 
>>> I have:
>>> - net distro very small (less than 1MB)
>>> - minimal distro I guess similar to that you have (but including equinox).
>>> 
>>> It's something that I planned for Karaf 4.0.0.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 05/07/2014 04:06 PM, Christian Schneider wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> just wanted to share my experiences in trying to make karaf 4 minimal
>>>> even smaller.
>>>> 
>>>> Currently karaf 4 minimal tar.gz is about 10MB.
>>>> 
>>>> With some small tweaks I was able to get it down to about 6MB.
>>>> I removed equinox (1.3 MB), XercesImpl (1.3MB in lib/endorsed) and some
>>>> features like the wrapper.
>>>> 
>>>> I would not really suggest to do all this for karaf minimal but perhaps
>>>> this helps some people who aim to build a really small custom distro.
>>>> What we might look into is to remove equinox and xerces from the
>>>> framework kar and add them later in the two distros. This would allow
>>>> people to build their own distros without tweaking the framework kar.
>>>> 
>>>> Christian
>>>> 
>>>> 
>>> --
>>> 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

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message