You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by giZmo79 <al...@gmail.com> on 2012/07/26 12:15:20 UTC

Creation of lots of hidden cache files on bundle creation

Hello,

I have a problem regarding hidden cache files which are created when
deploying) OSGI bundle in a loop.

My application:
	- My application is one OSGI bundle (called root-bundle) which creates
other bundles on the fly (called child-1, child-2, ...), packages them and
deploys them on the same servicemix instance
	- The child bundles are apache camel routes using Spring-DL (these bundles
perform very simple treatments)
	- To deploy/undeploy the child bundles, the root bundle uses the bundle API
(bundle start/stop is performed programmatically)

My Scenario:
	- I have a test which makes the root bundle create a lot of child bundles
and deploy them.

My problem:
	- I noticed that Servicemix creates a lot of hidden cache files in the
directory apache-servicemix/data/cache/org.eclipse.osgi directory. These
cache files are named
	.state.x, .lazy.x and .bundledata.x where x is a number (these files are
binary, so I cannot read them).
	- Unfortunately, these cache files are quite big (around 1Mo each) and when
I run the test over a long period, I run short on disk space (5GB filled in
a few hours). 

My configuration:
	- I am using apache-servicemix-4.3.1-fuse-01-09, Spring 3.0.5, Camel 2.6.0
on Linux
	
Now my questions:
	- Is it normal that ServiceMix creates those files?
	- If yes, what are these files and whet information do they contain?
	- Is there a way to prevent ServiceMix from creating them (like a
configuration)?
	
Thanks a lot for any support

G.



--
View this message in context: http://servicemix.396122.n5.nabble.com/Creation-of-lots-of-hidden-cache-files-on-bundle-creation-tp5713999.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Creation of lots of hidden cache files on bundle creation

Posted by giZmo79-2 <al...@gmail.com>.
Hello,

I finally found the answer to my question. It is a known bug of Equinox for
which bug reports and discussions can be found here:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=259981
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=353880


Regards,

A.



--
View this message in context: http://servicemix.396122.n5.nabble.com/Creation-of-lots-of-hidden-cache-files-on-bundle-creation-tp5713999p5714042.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Creation of lots of hidden cache files on bundle creation

Posted by Henryk Konsek <he...@gmail.com>.
Hi,

> Now my questions:
>         - Is it normal that ServiceMix creates those files?
>         - If yes, what are these files and whet information do they contain?
>         - Is there a way to prevent ServiceMix from creating them (like a
> configuration)?

Cache files contains runtime-related information about the bundle.
This is normal that Karaf stores some data in cache. The latter data
includes the bundle jar itself - you can easily check it by
investigating the cache directory by yourself.

Why Karaf caches the bundle jar and other bundle-related data? For the
startup speed - otherwise it will be forced to process all the bundles
at the container restart.

The cache size is usually not an issue since you do not deploy so much
bundles as in automated test. Also HDD space is cheap :) .

You may be also interested in this [1] piece of documentation.

[1] http://fusesource.com/docs/esb/4.4.1/esb_runtime/ESBRuntimePersistConfig.html

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com