cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Memory usage of the shared cache
Date Tue, 07 Feb 2012 14:27:45 GMT
The best way is to use a profile like YourKit that can give you the exact number. 


Without a profiler, you'd have to experiment. My guess is that you are less interested in
absolute numbers (how big is my cache right now?), but rather in a correlation of max cache
size vs. the amount of heap space your app requires (-Xmx).

There are 2 shared caches in Cayenne - object cache and query cache. Object cache size can
be configured in the Modeler for a given DataDomain. Query cache size configuration depends
on implementation (MapQueryCache, OSQueryCache, etc.)

So you have these 2 numbers to play with. You fill the caches to the maximum by doing some
work in the app, and then check how much memory the entire app is using after repeated garbage
collection cycles (e.g. via JConsole or VisualVM).

Andrus


On Feb 4, 2012, at 1:55 AM, Erlend Birkenes wrote:
> Hi
> 
> Is there a simple way to monitor or find out the memory usage of the shared
> cache at runtime?
> 
> 
> -Erlend


Mime
View raw message