cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Newland" <chris.newl...@emorphia.com>
Subject RE: Need help understanding C2 memory management
Date Wed, 10 Oct 2001 15:01:44 GMT
Hi Vadim,

I looked at the StoreJanitorImpl and realised that the version of
MRUMemoryStore I was using (the original from the C2b2 dist) did not 'AND'
the heap and free tests together and so as soon as the VM heap ceiling
(totalMemory) was raised past the value of 'heapsize', the GC routines would
run continuously even though there was plenty of free memory in the heap.

Thanks for the advice,

Chris

-----Original Message-----
From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
Sent: 09 October 2001 14:45
To: cocoon-dev@xml.apache.org
Subject: RE: Need help understanding C2 memory management


Chris,

IIRC, heapsize must  be greater then -Xms and may be less then or equal
to -Xmx
(MRUStore can't know Xmx and Xms values from Java, that's why this parameter
is used),
and freememory to some number you feel your application need to work stable.

GC should be kicked in when:
 - totalMemory() >= heapsize,
 - freememory < freeMemory()
(check with source code - I might miss some details)

Also, make sure writer thread also gets chance to work (~ have high enough
priority).

PS Latest C2 have centralized memory management component - one for all
MRUMemoryStores,
called janitor

Vadim

> -----Original Message-----
> From: Chris Newland [mailto:chris.newland@emorphia.com]
> Sent: Tuesday, October 09, 2001 6:37 AM
> To: Cocoon-Users
> Cc: Cocoon-Dev
> Subject: Need help understanding C2 memory management
>
>
> Hi all,
>
> I'm having great trouble configuring my Cocoon2b2 MRUMemoryStores. I have
a
> fast machine with 2GB of memory serving up a handful of tiny pages. After
> load testing 20 concurrent users for over 30 minutes, the system runs out
of
> memory.
>
> I've set the MRUMemoryStores to use thread priority 10 for GC and to
cleanup
> every 10 seconds but no GC activity appears to be occurring.
>
> Please can somebody explain why the parameters are redefined in each
> MRUMemoryStore configuration in cocoon.xconf?
>
> Why do we have both freememory and heapsize defined?
>
> Doesn't freememory = -Xmx value - MRU heapsize?
>
> Any advice would be greatly appreciated.
>
> Thanks,
>
> Chris
>
> Here are my settings:
>
> JVM (Sun 1.3.1_01 on Linux) options = -Xms500M and -Xmx1000M
>
> Here are my MRUMemoryStore settings from cocoon.xconf :
>
>   <store class="org.apache.cocoon.components.store.MRUMemoryStore">
>      <parameter name="freememory"  value="30000000"/>
>      <parameter name="heapsize"   value="700000000"/>
>      <parameter name="cleanupthreadinterval" value="10"/>
>      <parameter name="maxobjects" value="100"/>
>      <parameter name="usecleanupthread" value="true"/>
>      <parameter name="threadpriority" value="10"/>
>      <parameter name="filesystem" value="false"/>
>   </store>
>
>   <stream-cache class="org.apache.cocoon.components.store.MRUMemoryStore">
>      <parameter name="freememory"  value="30000000"/>
>      <parameter name="heapsize"   value="700000000"/>
>      <parameter name="cleanupthreadinterval" value="10"/>
>      <parameter name="maxobjects" value="100"/>
>      <parameter name="usecleanupthread" value="true"/>
>      <parameter name="threadpriority" value="10"/>
>      <parameter name="filesystem" value="false"/>
>   </stream-cache>
>
>   <event-cache class="org.apache.cocoon.components.store.MRUMemoryStore">
>      <parameter name="freememory"  value="30000000"/>
>      <parameter name="heapsize"   value="700000000"/>
>      <parameter name="cleanupthreadinterval" value="10"/>
>      <parameter name="maxobjects" value="100"/>
>      <parameter name="usecleanupthread" value="true"/>
>      <parameter name="threadpriority" value="10"/>
>      <parameter name="filesystem" value="false"/>
>   </event-cache>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message