Bug 113718 - OSGi Framework needs capability to limit number of open file handles used
Summary: OSGi Framework needs capability to limit number of open file handles used
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-25 17:41 EDT by Bill Tracey CLA
Modified: 2006-02-09 09:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Tracey CLA 2005-10-25 17:41:52 EDT
The OSGi framework currently needs to be able to open concurrently all of the
bundles installed.  This can be an issue on some device platforms where the
number of open files can be limited.

My suggestion would be to add the capability to specify how many files handles
the OSGi framework can concurrently hold open.  The framework code would manage
opening and closing of bundles in accordance with this paramater - probably
closing the least recently referenced bundle when it needed to open an
additional bundle that would exceed the open file limit specified.
Comment 1 Jeff McAffer CLA 2005-10-25 20:02:12 EDT
Cool!  Is this related to the idea of timing out jars (bug 84066)?  Rather 
than timeout this is some sort of MRU cache.  interesting.
Comment 2 Thomas Watson CLA 2005-10-25 22:13:21 EDT
Yes, Bill discussed this idea with me and I thought is sounded promising.  It 
is trying to solve the same problem as bug 84066.   I think it has better 
behavior because timeouts have issues when resources are limited, the timeout 
may not cause the files to be closed before you run out of file handles (for 
example, while installing many bundles at the same time).  This solution 
should also not require an extra thread to monitor the timeouts.

I think we should investigate.
Comment 3 Thomas Watson CLA 2005-11-03 16:29:12 EST
I have released a possible implementation of an MRU cache for open 
ZipBundleFiles into the new EquinoxAdaptor being developed in the equinox-
incubator see 114968.  A limit on the number of zip files opened can be set by 
specifying the property equinox.bundlefile.limit
Comment 4 Thomas Watson CLA 2006-02-09 09:26:04 EST
The new adaptor has been released to HEAD for 3.2 M5.  A new property has been added to limit the number of jar files the framework will keep open:

osgi.bundlefile.limit