cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Performance Tesing
Date Wed, 03 Jun 2009 08:10:05 GMT
And another one...

Query cache and snapshot cache are all using LRUMaps, so they won't  
grow indefinitely even in 2.0, however the total amount of RAM given  
to the JVM may not be enough to fill the LRU to the full default  
capacity. So either consider reducing the "Size of Object Cache" in  
the Modeler, or give your process more memory with -Xmx.

In any event, consider using a profiler to check what causes a memory  
leak. This may be faster than guessing. Can't recommend anything free  
(there should be some Eclipse plugins??). I am using YourKit profiler  
for this purpose.

Andrus


On Jun 3, 2009, at 11:04 AM, Andrus Adamchik wrote:

> I've done a fair share of Cayenne-based application performance  
> testing. Although I don't have a single recipe, it all depends on  
> the application expected usage patterns.
>
> Just a general Cayenne memory management hint - if you are using  
> Cayenne version prior to 3.0, watch out for DataContexts filling  
> with objects. Every single object fetched via a DataContext, will be  
> cached in it, so it is expected that the user takes care of  
> disposing of DataContexts in one way or another (putting a  
> DataContext in a session is a common strategy for doing that, but  
> depending on your app this may not be enough). So if you are  
> processing lots of objects within a single DataContext, consider  
> replacing it manually (3.0 solves this problem by using weak  
> references).
>
> Andrus
>
>
> On Jun 2, 2009, at 1:44 AM, Joe Baldwin wrote:
>> I am attempting to do performance testing on a JSP webapp that uses  
>> Cayenne for all of the database access.  I am currently using  
>> Jmeter and JConsole, but the first tests seem to indicate that  
>> there is a memory leak (either that or I am created a bad test).
>>
>> Does anyone have good experience with a test suite that is  
>> compatible with Cayenne in a Tomcat context?
>>
>> Thanks,
>> Joe
>
>


Mime
View raw message