You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by James Johnson <jo...@gmail.com> on 2007/01/09 23:30:25 UTC

Cache Memory Size

I was wondering if there was a way to determine the amount of memory being
allocated by a iBatis cache. I read a thread called "Estimating amount of
memory need for cache".  However, the thread ended on 25 Jul 2005 with
mention of an utility being developed. Was anything ever developed? Or is
there a some other way to determine the size of a cache?

I believe that the cache is storing query statements and the resulting
objects in memory. Are the query statements the keys in a map with the
values being object(s)?  Also, how does the cache grow? Does it preallocate
memory in the "map" based on the cache size or does it allocate just what is
needed upon each object being added to the cache?

Sorry for all the questions. Still fairly new to iBatis and trying to get a
handle on these caching aspects.

Thanks in advance for any help.

Re: Cache Memory Size

Posted by Guido García Bernardo <gg...@tid.es>.
Eclipse Colorer is an open source and free Eclipse plugin I've been 
using (not exactly with your purposes).

http://eclipsecolorer.sourceforge.net/index_profiler.html

Maybe it could help you, too.
Guido.

Larry Meadors escribió:
> If you have some money burning a hole in your pocket, JProbe
> absolutely rules, imo.
>
> For less, you can get JProfiler. I have heard good things about
> yourkit, too..not sure of the pricing, but it is close to the price of
> JProfiler, IIRC.
>
> If you want a free one, netbeans has one built in...it's a shame the
> IDE sucks so bad. ;-)
>
> There are a handful of other free ones, too.
>
> Larry
>
>
> On 1/10/07, James Johnson <jo...@gmail.com> wrote:
>> Ok, thanks. Is there a profiling tool that you would recommend?
>>
>>
>>
>> On 1/9/07, Brandon Goodin <brandon.goodin@gmail.com > wrote:
>> > The short answer is no. There really isn't a reliable way in Java to
>> accomplish this from within the java code. Therefore it will not be
>> something that is internally supported in iBATIS. I would recommend you
>> select a good profiling tool and do your best to surmise memory usage 
>> from
>> it.
>> >
>> > Brandon
>> >
>> >
>> >
>> > On 1/9/07, James Johnson < johnson.james2@gmail.com> wrote:
>> > >
>> > > I was wondering if there was a way to determine the amount of memory
>> being allocated by a iBatis cache. I read a thread called "Estimating 
>> amount
>> of memory need for cache".  However, the thread ended on 25 Jul 2005 
>> with
>> mention of an utility being developed. Was anything ever developed? 
>> Or is
>> there a some other way to determine the size of a cache?
>> > >
>> > > I believe that the cache is storing query statements and the 
>> resulting
>> objects in memory. Are the query statements the keys in a map with the
>> values being object(s)?  Also, how does the cache grow? Does it 
>> preallocate
>> memory in the "map" based on the cache size or does it allocate just 
>> what is
>> needed upon each object being added to the cache?
>> > >
>> > > Sorry for all the questions. Still fairly new to iBatis and 
>> trying to
>> get a handle on these caching aspects.
>> > >
>> > > Thanks in advance for any help.
>> > >
>> >
>> >
>>
>>
>


-- 
Guido García Bernardo

Tfn. +34 983 54 89 08
ITDEUSTO - Valladolid


Re: Cache Memory Size

Posted by Larry Meadors <lm...@apache.org>.
If you have some money burning a hole in your pocket, JProbe
absolutely rules, imo.

For less, you can get JProfiler. I have heard good things about
yourkit, too..not sure of the pricing, but it is close to the price of
JProfiler, IIRC.

If you want a free one, netbeans has one built in...it's a shame the
IDE sucks so bad. ;-)

There are a handful of other free ones, too.

Larry


On 1/10/07, James Johnson <jo...@gmail.com> wrote:
> Ok, thanks. Is there a profiling tool that you would recommend?
>
>
>
> On 1/9/07, Brandon Goodin <brandon.goodin@gmail.com > wrote:
> > The short answer is no. There really isn't a reliable way in Java to
> accomplish this from within the java code. Therefore it will not be
> something that is internally supported in iBATIS. I would recommend you
> select a good profiling tool and do your best to surmise memory usage from
> it.
> >
> > Brandon
> >
> >
> >
> > On 1/9/07, James Johnson < johnson.james2@gmail.com> wrote:
> > >
> > > I was wondering if there was a way to determine the amount of memory
> being allocated by a iBatis cache. I read a thread called "Estimating amount
> of memory need for cache".  However, the thread ended on 25 Jul 2005 with
> mention of an utility being developed. Was anything ever developed? Or is
> there a some other way to determine the size of a cache?
> > >
> > > I believe that the cache is storing query statements and the resulting
> objects in memory. Are the query statements the keys in a map with the
> values being object(s)?  Also, how does the cache grow? Does it preallocate
> memory in the "map" based on the cache size or does it allocate just what is
> needed upon each object being added to the cache?
> > >
> > > Sorry for all the questions. Still fairly new to iBatis and trying to
> get a handle on these caching aspects.
> > >
> > > Thanks in advance for any help.
> > >
> >
> >
>
>

Re: Cache Memory Size

Posted by James Johnson <jo...@gmail.com>.
Ok, thanks. Is there a profiling tool that you would recommend?


On 1/9/07, Brandon Goodin <br...@gmail.com> wrote:
>
> The short answer is no. There really isn't a reliable way in Java to
> accomplish this from within the java code. Therefore it will not be
> something that is internally supported in iBATIS. I would recommend you
> select a good profiling tool and do your best to surmise memory usage from
> it.
>
> Brandon
>
> On 1/9/07, James Johnson <jo...@gmail.com> wrote:
> >
> >
> > I was wondering if there was a way to determine the amount of memory
> > being allocated by a iBatis cache. I read a thread called "Estimating
> > amount of memory need for cache".  However, the thread ended on 25 Jul
> > 2005 with mention of an utility being developed. Was anything ever
> > developed? Or is there a some other way to determine the size of a cache?
> >
> > I believe that the cache is storing query statements and the resulting
> > objects in memory. Are the query statements the keys in a map with the
> > values being object(s)?  Also, how does the cache grow? Does it
> > preallocate memory in the "map" based on the cache size or does it allocate
> > just what is needed upon each object being added to the cache?
> >
> > Sorry for all the questions. Still fairly new to iBatis and trying to
> > get a handle on these caching aspects.
> >
> > Thanks in advance for any help.
> >
>
>

Re: Cache Memory Size

Posted by Brandon Goodin <br...@gmail.com>.
The short answer is no. There really isn't a reliable way in Java to
accomplish this from within the java code. Therefore it will not be
something that is internally supported in iBATIS. I would recommend you
select a good profiling tool and do your best to surmise memory usage from
it.

Brandon

On 1/9/07, James Johnson <jo...@gmail.com> wrote:
>
>
> I was wondering if there was a way to determine the amount of memory being
> allocated by a iBatis cache. I read a thread called "Estimating amount of
> memory need for cache".  However, the thread ended on 25 Jul 2005 with
> mention of an utility being developed. Was anything ever developed? Or is
> there a some other way to determine the size of a cache?
>
> I believe that the cache is storing query statements and the resulting
> objects in memory. Are the query statements the keys in a map with the
> values being object(s)?  Also, how does the cache grow? Does it
> preallocate memory in the "map" based on the cache size or does it allocate
> just what is needed upon each object being added to the cache?
>
> Sorry for all the questions. Still fairly new to iBatis and trying to get
> a handle on these caching aspects.
>
> Thanks in advance for any help.
>