db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: OutOfMemoryErrors on group by select
Date Mon, 08 Feb 2010 15:55:10 GMT
On 08.02.10 16:42, Ronald Rudy wrote:
> Kristian,
>
> Yes, I actually do have a heap dump just like you mentioned - sorry I had completely
forgotten I retrieved one earlier (it was done so late last evening and I am still getting
my bearings this morning :))
>
> Here is the top 17 or so from the histogram: (view the email w/ fixed width and it should
be ok)
>
> Class                                            Instance Count    Total Size
> [C                                                      1596861    307166530
> [B                                                        10719    69009057
> org.apache.derby.iapi.types.SQLVarchar                  1391370    38958360
> java.lang.String                                        1397786    22364576
> [[C                                                     1392460    16709932
> [Lorg.apache.derby.iapi.types.DataValueDescriptor;       200932    8796896
> org.apache.derby.impl.store.access.sort.Node             198342    5553576
> org.apache.derby.iapi.types.SQLInteger                   398201    1991005
> org.apache.derby.impl.store.raw.data.StoredRecordHeader   93119    1583023
> [Lorg.apache.derby.impl.store.access.sort.Node;               9    1049092
> org.apache.derby.impl.store.raw.data.RecordId             48191    578292
> [Ljava.util.concurrent.ConcurrentHashMap$HashEntry;         192    425876
> [Lorg.apache.derby.impl.store.raw.data.StoredRecordHeader; 2000    404880
> org.apache.derby.impl.store.raw.data.StoredPage            2000    352000
> [Ljava.util.HashMap$Entry;                                  837    303432
> [I                                                         4839    286212
> java.lang.Class                                            2584    196384
>
> It looks like it's keeping a ton of SQLVarchar's in memory..
>    

Thanks, Ron.

Indeed... If I wanted to get this fixed, I would have done one or both 
of these:
  a) Check if the same problem exist in 10.5.
  b) Write a runnable repro executing the problematic query (the data 
should preferably be generated by the repro), attach it to a Jira [1].

Maybe one could learn something by using jhat or similar (i.e. why is 
Derby holding on to all the SQLVarchar objects), but having a repro 
would help a lot... Further, it is not unlikely that many of the Strings 
and the character arrays belong to the SQLVarchar objects...


Regards,
-- 
Kristian

[1] https://issues.apache.org/jira/browse/DERBY

> -Ron
>
>
>
> On Feb 8, 2010, at 9:48:52 AM, Kristian Waagan wrote:
>    
>> Hi Ronald,
>>
>> If you can easily control this process, can you run it with -XX:+HeapDumpOnOutOfMemoryError
and post a heap dump summary?
>> (I don't remember off the top of my head how you extract a histogram from the binary
heap dump, but I guess maybe using jmap or HeapViewer)
>> Are there many Derby classes in the top 10?
>> You might only see a bunch of arrays up there, in which case more investigation may
be required to understand what's going on.
>>
>>
>> Regards,
>> -- 
>> Kristian
>>      
>    


Mime
View raw message