You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jacco van Weert <11...@gmail.com> on 2008/10/07 11:21:33 UTC
Jackrabbit's memory use
Hello,
For some time I am trying to master to memory use of Jackrabbit.
I am using Jackrabbit in a webserver application (JeCARS).
When started and accessing nodes there are a couple of megabytes in use,
regardless of the size of the repository itself.
At a certain time I run the "JeCARS internal" garbage collector to remove
expired JCR nodes and also run the Datastore GC.
After it is finished, the memory in use is dramatically higher.... this
because the Datastore checks every node in the repository, but it doesn't
falls back (cache?)
My question, is there a way to "clear the cache" to reclaim the memory?
Were is memory cached?.... session logout doesn't seem to help.
Greetings,
Jacco
--
-------------------------------------
Jacco van Weert -- 1111software@gmail.com
JCR Controller -- http://www.xs4all.nl/~weertj/jcr
JeCARS -- http://jecars.sourceforge.net
Re: Jackrabbit's memory use
Posted by Jacco van Weert <11...@gmail.com>.
Hello,
setMaxMemory(1) helped "a bit".... by the way without the cache the
repository isn't that slow.
In my example 21 seconds with the cache against 26 seconds without it.
But the memory usage stays the same. Looking at the profiling information I
think it is ItemStateCache which caches a lot of data, I don't see an public
reachable method to purge the cache?
Are more caches?
Gr.
Jacco
On Tue, Oct 7, 2008 at 11:44 AM, Thomas Müller <th...@day.com>wrote:
> Hi,
>
> I don't know of a way to completely clear the cache, except the
> obvious 'close the repository'.
>
> There is a way to reduce the cache size however:
>
> ((org.apache.jackrabbit.core.RepositoryImpl)rep).
> getCacheManager().
> setMaxMemory(1);
>
> This will however be applied immediately. The cache size is applied
> once a second at most, and is triggered by
> CacheManager.cacheAccessed(). Don't forget to change the size back to
> the old value afterwards, otherwise the repository will be very slow.
>
> Regards,
> Thomas
>
>
> On Tue, Oct 7, 2008 at 11:21 AM, Jacco van Weert <11...@gmail.com>
> wrote:
> > Hello,
> >
> > For some time I am trying to master to memory use of Jackrabbit.
> >
> > I am using Jackrabbit in a webserver application (JeCARS).
> >
> > When started and accessing nodes there are a couple of megabytes in use,
> > regardless of the size of the repository itself.
> > At a certain time I run the "JeCARS internal" garbage collector to remove
> > expired JCR nodes and also run the Datastore GC.
> > After it is finished, the memory in use is dramatically higher.... this
> > because the Datastore checks every node in the repository, but it doesn't
> > falls back (cache?)
> >
> > My question, is there a way to "clear the cache" to reclaim the memory?
> > Were is memory cached?.... session logout doesn't seem to help.
> >
> >
> > Greetings,
> >
> > Jacco
> >
> >
> >
> > --
> > -------------------------------------
> > Jacco van Weert -- 1111software@gmail.com
> > JCR Controller -- http://www.xs4all.nl/~weertj/jcr
> > JeCARS -- http://jecars.sourceforge.net
> >
>
--
-------------------------------------
Jacco van Weert -- 1111software@gmail.com
JCR Controller -- http://www.xs4all.nl/~weertj/jcr
JeCARS -- http://jecars.sourceforge.net
Re: Jackrabbit's memory use
Posted by Thomas Müller <th...@day.com>.
Hi,
I don't know of a way to completely clear the cache, except the
obvious 'close the repository'.
There is a way to reduce the cache size however:
((org.apache.jackrabbit.core.RepositoryImpl)rep).
getCacheManager().
setMaxMemory(1);
This will however be applied immediately. The cache size is applied
once a second at most, and is triggered by
CacheManager.cacheAccessed(). Don't forget to change the size back to
the old value afterwards, otherwise the repository will be very slow.
Regards,
Thomas
On Tue, Oct 7, 2008 at 11:21 AM, Jacco van Weert <11...@gmail.com> wrote:
> Hello,
>
> For some time I am trying to master to memory use of Jackrabbit.
>
> I am using Jackrabbit in a webserver application (JeCARS).
>
> When started and accessing nodes there are a couple of megabytes in use,
> regardless of the size of the repository itself.
> At a certain time I run the "JeCARS internal" garbage collector to remove
> expired JCR nodes and also run the Datastore GC.
> After it is finished, the memory in use is dramatically higher.... this
> because the Datastore checks every node in the repository, but it doesn't
> falls back (cache?)
>
> My question, is there a way to "clear the cache" to reclaim the memory?
> Were is memory cached?.... session logout doesn't seem to help.
>
>
> Greetings,
>
> Jacco
>
>
>
> --
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr
> JeCARS -- http://jecars.sourceforge.net
>