You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2005/03/09 23:20:07 UTC
svn commit: r156697 - in cocoon/branches/BRANCH_2_1_X/src:
java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java
webapp/WEB-INF/cocoon.xconf
Author: vgritsenko
Date: Wed Mar 9 14:20:04 2005
New Revision: 156697
URL: http://svn.apache.org/viewcvs?view=rev&rev=156697
Log:
janitor documentation
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java
cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java?view=diff&r1=156696&r2=156697
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java Wed Mar 9 14:20:04 2005
@@ -91,14 +91,14 @@
/** Used memory change rate in bytes per second */
private long maxRateOfChange = 1;
-
+
/**
* Parameterize the StoreJanitorImpl.
*/
public void parameterize(Parameters params) throws ParameterException {
this.jvm = Runtime.getRuntime();
this.minFreeMemory = params.getParameterAsInteger("freememory", 1024 * 1024);
- this.maxHeapSize = params.getParameterAsInteger("heapsize", 60 * 1024 * 1024);
+ this.maxHeapSize = params.getParameterAsInteger("heapsize", 66600000);
// Parameter value is in seconds, converted to millis
this.threadInterval = params.getParameterAsInteger("cleanupthreadinterval", 10) * 1000;
this.adaptiveThreadInterval = params.getParameterAsBoolean("adaptivethreadinterval", false);
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf?view=diff&r1=156696&r2=156697
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf Wed Mar 9 14:20:04 2005
@@ -40,11 +40,9 @@
| For development environment, set the check-reload to yes.
| For production environment, it is advisable to set check-reload to no.
+-->
- <sitemap
- file="context://sitemap.xmap"
- check-reload="yes"
- logger="sitemap"
- />
+ <sitemap file="context://sitemap.xmap"
+ check-reload="yes"
+ logger="sitemap"/>
<!-- ========================= Sitemap Flowscript ========================== -->
@@ -119,15 +117,15 @@
| expiring continuations. Currently only the "periodic" type is
| supported.
|
- | If you need higher security you can bind your continuations
+ | If you need higher security you can bind your continuations
| to session. This way only the session that initially created
- | the continuation can later resume it. Also if session gets
- | invalidated all continuations are invalidated as well.
+ | the continuation can later resume it. Also if session gets
+ | invalidated all continuations are invalidated as well.
| Enable this feature for web applications by setting
| 'session-bound-continuations' to true.
+-->
- <continuations-manager logger="flow.manager" time-to-live="3600000"
- session-bound-continuations="false"
+ <continuations-manager logger="flow.manager" time-to-live="3600000"
+ session-bound-continuations="false"
continuation-sharing-bug-compatible="false">
<expirations-check type="periodic">
<offset>180000</offset>
@@ -317,8 +315,8 @@
| <parameter name="verbosity" value="2"/>
+-->
<entity-resolver logger="core.resolver">
- <parameter name="catalog" value="WEB-INF/entities/catalog"/>
- <parameter name="verbosity" value="1"/>
+ <parameter name="catalog" value="WEB-INF/entities/catalog"/>
+ <parameter name="verbosity" value="1"/>
</entity-resolver>
<!--+
@@ -436,14 +434,14 @@
<parameter name="use-store" value="true"/>
<parameter name="transformer-factory" value="com.icl.saxon.TransformerFactoryImpl"/>
</component>
- +-->
+ +-->
<!-- Xpath Processor: -->
<xpath-processor class="org.apache.excalibur.xml.xpath.XPathProcessorImpl" logger="core.xpath-processor"/>
<!-- The XMLizers converts different mime-types to XML -->
<xmlizer>
- <parser role="org.apache.excalibur.xml.sax.SAXParser" mime-type="text/xml"/>
+ <parser role="org.apache.excalibur.xml.sax.SAXParser" mime-type="text/xml"/>
</xmlizer>
<!-- ============================ Object Stores =========================== -->
@@ -499,23 +497,45 @@
| to be a working value).
+-->
<store-janitor logger="core.store.janitor">
- <!-- How much free memory shall be available in the jvm -->
- <parameter name="freememory" value="2048000"/>
- <!-- Indicates the limit of the jvm memory consumption. The default max
- heapsize for Sun's JVM is (almost) 64Mb -->
- <parameter name="heapsize" value="66600000"/>
- <!-- How often shall the cleanup thread check memory -->
- <parameter name="cleanupthreadinterval" value="10"/>
- <!-- Experimental adaptive algorithm for cleanup interval
- <parameter name="adaptivethreadinterval" value="true"/>
- -->
- <!-- Indicates the thread priority of the cleanup thread -->
- <parameter name="threadpriority" value="5"/>
- <!-- How much percent of the elements of each registered Store
- shall be removed when low on memory. Default 10% -->
- <parameter name="percent_to_free" value="10"/>
- <!-- Invoke the garbage collector when low memory is reached -->
- <parameter name="invokegc" value="false"/>
+ <!--+
+ | How much free memory shall be available in the jvm?
+ | If not specified, defaults to 1Mb.
+ +-->
+ <parameter name="freememory" value="2048000"/>
+ <!--+
+ | How much memory at max jvm can consume?
+ | The default max heapsize for Sun's JVM is (almost) 64Mb,
+ | can be increased by specifying -Xmx command line parameter.
+ | If not specified, defaults to 66600000 bytes.
+ +-->
+ <parameter name="heapsize" value="66600000"/>
+ <!--+
+ | How often shall the cleanup thread check memory?
+ | If not specified, defaults to 10 seconds.
+ +-->
+ <parameter name="cleanupthreadinterval" value="10"/>
+ <!--+
+ | Experimental adaptive algorithm for cleanup interval
+ <parameter name="adaptivethreadinterval" value="true"/>
+ +-->
+ <!--+
+ | What percent of the store elements shall be dropped on low memory?
+ | If not specified, defaults to 10%
+ +-->
+ <parameter name="percent_to_free" value="10"/>
+ <!--+
+ | Shall garbage collector be invoked on low memory?
+ | If not specified, defaults to false.
+ +-->
+ <parameter name="invokegc" value="false"/>
+
+ <!--+
+ | What should be the priority of the cleanup thread?
+ | This parameter is used only by older implementation of the janitor.
+ | New implementation uses centrally configured thread pool (see
+ | thread-pools element below).
+ <parameter name="threadpriority" value="5"/>
+ +-->
</store-janitor>
<!-- ========================= Protocol Handlers =========================== -->
Re: svn commit: r156697 - in cocoon/branches/BRANCH_2_1_X/src:java/org/apache/cocoon/components/sto
re/impl/StoreJanitorImpl.javawebapp/WEB-INF/cocoon.xconf
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:
> On Mie, 9 de Marzo de 2005, 16:20, vgritsenko@apache.org dijo:
>
>> this.minFreeMemory = params.getParameterAsInteger("freememory",
>>1024 * 1024);
>>- this.maxHeapSize = params.getParameterAsInteger("heapsize", 60 *
>>1024 * 1024);
>>+ this.maxHeapSize = params.getParameterAsInteger("heapsize",
>>66600000);
>
>
> 1-Why this change?
> 2-Why only here and not in "this.minFreeMemory"?
Hardcoded default was exactly 60Mb, while Sun JVM by default has a bit less than
64Mb. Because this setting should be as close to the actual number as possible,
I propagated default setting from the cocoon.xconf (66600000) back into the code.
> This are only questions. I just want to learn. ;-)
No problem.
Vadim
Re: svn commit: r156697 - in
cocoon/branches/BRANCH_2_1_X/src:java/org/apache/cocoon/components/sto
re/impl/StoreJanitorImpl.javawebapp/WEB-INF/cocoon.xconf
Posted by Antonio Gallardo <ag...@agssa.net>.
On Mie, 9 de Marzo de 2005, 16:20, vgritsenko@apache.org dijo:
> Author: vgritsenko
> Date: Wed Mar 9 14:20:04 2005
> New Revision: 156697
>
> URL: http://svn.apache.org/viewcvs?view=rev&rev=156697
> Log:
> janitor documentation
> http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java?view=diff&r1=156696&r2=156697
> ==============================================================================
> ---
> cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java
> (original)
> +++
> cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/store/impl/StoreJanitorImpl.java
> Wed Mar 9 14:20:04 2005
> /**
> * Parameterize the StoreJanitorImpl.
> */
> public void parameterize(Parameters params) throws ParameterException
> {
> this.jvm = Runtime.getRuntime();
> this.minFreeMemory = params.getParameterAsInteger("freememory",
> 1024 * 1024);
> - this.maxHeapSize = params.getParameterAsInteger("heapsize", 60 *
> 1024 * 1024);
> + this.maxHeapSize = params.getParameterAsInteger("heapsize",
> 66600000);
1-Why this change?
2-Why only here and not in "this.minFreeMemory"?
This are only questions. I just want to learn. ;-)
Best Regards,
Antonio Gallardo.