You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Andy Gumbrecht (JIRA)" <ji...@apache.org> on 2010/04/27 09:23:34 UTC

[jira] Created: (OPENEJB-1265) TempClassLoader buffer reuse reduces memory requirements

TempClassLoader buffer reuse reduces memory requirements
--------------------------------------------------------

                 Key: OPENEJB-1265
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1265
             Project: OpenEJB
          Issue Type: Improvement
          Components: server
    Affects Versions: 3.1.x
         Environment: All
            Reporter: Andy Gumbrecht
            Priority: Trivial
         Attachments: TempClassLoader.patch

The current TempClassLoader potentially uses a new 8k ByteArrayOutputStream per class that it inspects. 
Whilst hunting for a possible ClassLoader issue I  found that replacing the ByteArrayOutputStream with a reusable one leads to a substantial reduction in memory during server start up.

I am unable to quantify what 'substantial' means in real terms as I have not run any real benchmarking, but it is fair to say that I had noticed heap sizes growing to over 180m during a server start compared to the 90m that I have now. These values would be application specific, but it would be nice to see if this is an improvement for others.

I have also synchronized a few access methods to ensure that resources are protected during the inspection process.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENEJB-1265) TempClassLoader buffer reuse reduces memory requirements

Posted by "Andy Gumbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Gumbrecht updated OPENEJB-1265:
------------------------------------

    Attachment: TempClassLoader.patch

Suggested patch

> TempClassLoader buffer reuse reduces memory requirements
> --------------------------------------------------------
>
>                 Key: OPENEJB-1265
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1265
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.1.x
>         Environment: All
>            Reporter: Andy Gumbrecht
>            Priority: Trivial
>         Attachments: TempClassLoader.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> The current TempClassLoader potentially uses a new 8k ByteArrayOutputStream per class that it inspects. 
> Whilst hunting for a possible ClassLoader issue I  found that replacing the ByteArrayOutputStream with a reusable one leads to a substantial reduction in memory during server start up.
> I am unable to quantify what 'substantial' means in real terms as I have not run any real benchmarking, but it is fair to say that I had noticed heap sizes growing to over 180m during a server start compared to the 90m that I have now. These values would be application specific, but it would be nice to see if this is an improvement for others.
> I have also synchronized a few access methods to ensure that resources are protected during the inspection process.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.