You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Roger Keays (JIRA)" <ji...@apache.org> on 2006/10/31 02:08:16 UTC

[jira] Created: (OPENJPA-71) Caching primitive array types consumes excessive memory

Caching primitive array types consumes excessive memory
-------------------------------------------------------

                 Key: OPENJPA-71
                 URL: http://issues.apache.org/jira/browse/OPENJPA-71
             Project: OpenJPA
          Issue Type: Bug
          Components: datacache
            Reporter: Roger Keays


As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.

AbstractPCData needs to be fixed to handle simple arrays.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-71) Caching primitive array types consumes excessive memory

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

Patrick Linskey updated OPENJPA-71:
-----------------------------------

    Fix Version/s: 0.9.7

What happens if openjpa.DynamicDataStructs is enabled?

> Caching primitive array types consumes excessive memory
> -------------------------------------------------------
>
>                 Key: OPENJPA-71
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-71
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>            Reporter: Roger Keays
>             Fix For: 0.9.7
>
>
> As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.
> AbstractPCData needs to be fixed to handle simple arrays.

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


Re: [jira] Resolved: (OPENJPA-71) Caching primitive array types consumes excessive memory

Posted by Craig L Russell <Cr...@Sun.COM>.
It might be good to verify the resolution messages so you can correct  
the JIRA Client errors when they occur.

Craig

On Mar 9, 2007, at 3:11 AM, Patrick Linskey wrote:

> No, I didn't. Must have been a glitch in how JIRA Client merged the
> changes to the issue made while I was offline.
>
> -Patrick
>
> -- 
> Patrick Linskey
> BEA Systems, Inc.
>
> ______________________________________________________________________ 
> _
> Notice:  This email message, together with any attachments, may  
> contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> affiliated
> entities,  that may be confidential,  proprietary,  copyrighted   
> and/or
> legally privileged, and is intended solely for the use of the  
> individual
> or entity named in this message. If you are not the intended  
> recipient,
> and have received this message in error, please immediately return  
> this
> by email and then delete it.
>
>> -----Original Message-----
>> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM]
>> Sent: Thursday, March 08, 2007 6:27 PM
>> To: open-jpa-dev@incubator.apache.org
>> Subject: Re: [jira] Resolved: (OPENJPA-71) Caching primitive
>> array types consumes excessive memory
>>
>> Hi Patrick,
>>
>> The message below says that when you resolved OPENJPA-71, you
>> changed
>> the fix version from 0.9.7 to none. Now there is no fix version.
>>
>> Was that your intent?
>>
>> Craig
>>
>> On Mar 8, 2007, at 1:35 AM, Patrick Linskey (JIRA) wrote:
>>
>>>
>>>      [ https://issues.apache.org/jira/browse/OPENJPA-71?
>>> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>
>>> Patrick Linskey resolved OPENJPA-71.
>>> ------------------------------------
>>>
>>>        Resolution: Fixed
>>>     Fix Version/s:     (was: 0.9.7)
>>
>> Craig Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/ 
>> jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


RE: [jira] Resolved: (OPENJPA-71) Caching primitive array types consumes excessive memory

Posted by Patrick Linskey <pl...@bea.com>.
No, I didn't. Must have been a glitch in how JIRA Client merged the
changes to the issue made while I was offline.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Thursday, March 08, 2007 6:27 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [jira] Resolved: (OPENJPA-71) Caching primitive 
> array types consumes excessive memory
> 
> Hi Patrick,
> 
> The message below says that when you resolved OPENJPA-71, you 
> changed  
> the fix version from 0.9.7 to none. Now there is no fix version.
> 
> Was that your intent?
> 
> Craig
> 
> On Mar 8, 2007, at 1:35 AM, Patrick Linskey (JIRA) wrote:
> 
> >
> >      [ https://issues.apache.org/jira/browse/OPENJPA-71? 
> > page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> >
> > Patrick Linskey resolved OPENJPA-71.
> > ------------------------------------
> >
> >        Resolution: Fixed
> >     Fix Version/s:     (was: 0.9.7)
> 
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 

Re: [jira] Resolved: (OPENJPA-71) Caching primitive array types consumes excessive memory

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Patrick,

The message below says that when you resolved OPENJPA-71, you changed  
the fix version from 0.9.7 to none. Now there is no fix version.

Was that your intent?

Craig

On Mar 8, 2007, at 1:35 AM, Patrick Linskey (JIRA) wrote:

>
>      [ https://issues.apache.org/jira/browse/OPENJPA-71? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Patrick Linskey resolved OPENJPA-71.
> ------------------------------------
>
>        Resolution: Fixed
>     Fix Version/s:     (was: 0.9.7)

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


[jira] Resolved: (OPENJPA-71) Caching primitive array types consumes excessive memory

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

Patrick Linskey resolved OPENJPA-71.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.9.7)

> Caching primitive array types consumes excessive memory
> -------------------------------------------------------
>
>                 Key: OPENJPA-71
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-71
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>            Reporter: Roger Keays
>
> As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.
> AbstractPCData needs to be fixed to handle simple arrays.

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


[jira] Updated: (OPENJPA-71) Caching primitive array types consumes excessive memory

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

Patrick Linskey updated OPENJPA-71:
-----------------------------------

        Fix Version/s: 0.9.7
    Affects Version/s: 0.9.0
                       0.9.6

> Caching primitive array types consumes excessive memory
> -------------------------------------------------------
>
>                 Key: OPENJPA-71
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-71
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 0.9.0, 0.9.6
>            Reporter: Roger Keays
>             Fix For: 0.9.7
>
>
> As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.
> AbstractPCData needs to be fixed to handle simple arrays.

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


[jira] Commented: (OPENJPA-71) Caching primitive array types consumes excessive memory

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479276 ] 

Patrick Linskey commented on OPENJPA-71:
----------------------------------------

Resolved. I changed AbstractPCData to not marshal / unmarshal arrays via Lists, but I did not do any memory footprint measurement.

> Caching primitive array types consumes excessive memory
> -------------------------------------------------------
>
>                 Key: OPENJPA-71
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-71
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>            Reporter: Roger Keays
>
> As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.
> AbstractPCData needs to be fixed to handle simple arrays.

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