You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "GianMaria Romanato (JIRA)" <ji...@apache.org> on 2015/04/15 11:37:58 UTC

[jira] [Commented] (FELIX-4656) Improve memory usage and speed of the resolver

    [ https://issues.apache.org/jira/browse/FELIX-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14495930#comment-14495930 ] 

GianMaria Romanato commented on FELIX-4656:
-------------------------------------------

Hello, I am writing this comment to express gratitude to Guillaume Nodet and in the hope that it will be indexed by search engines and may help others who experienced frequent deadlocks when starting IBM WebSphere Liberty 8.5.5.4 or 8.5.5.5.

In fact, it turns out that those Felix classes are used in Equinox as well (at least 3.10)  which is used by WebSphere Liberty (8.5.5.4 and 8.5.5.5) and we had serious issues in starting WebSphere Liberty with an OSGi application made of more than 100 bundles.
The problem was so serious that our system administrators had to perform many start-wait-kill-retry iterations every time we had to start the application (often spending one or two hours before the server started successfully) because WebSphere Liberty was entering what looked like an endless loop and eventually reached an OOM error if left running for long enough.

By checking the content of the out of memory dump with Eclipse MAT I spotted the large Candidates list and reached this issue. Then I patched the Equinox sources with the changes from Guillaume and applied the patch to Liberty which now starts quickly every time which a much lower memory footprint.

As we cannot of course go live with a "patched" WebSphere distribution, I'll shortly open a defect to IBM and point them to this Felix issue.

Again, thank you very very much.

> Improve memory usage and speed of the resolver
> ----------------------------------------------
>
>                 Key: FELIX-4656
>                 URL: https://issues.apache.org/jira/browse/FELIX-4656
>             Project: Felix
>          Issue Type: Improvement
>          Components: Resolver
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: resolver-1.2.0
>
>
> During big resolutions (> 100 bundles), the memory consumption can become very huge, mostly by keeping a lot of copies of the Candidates object.
> I want to lower the memory requirements of the resolver without touching the algorithm at all (which would be a different improvement).
> This can be done by using :
>   * lower memory intensive collections
>   * do smart copies of those collections (where they would only actually copy the data when modify)
> The second item is slightly more difficult to achieve, as the maps in the Candidate objects contains Set and List, which would mean that those must be copied too.  So it could actually be complementary, if achievable.
> For the first one, the HashMap and HashSet are very memory intensive.  I'll introduce two new collections which will lower the requirements.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)