You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/06/13 15:38:51 UTC

[C2] New Feature in Component Configuration

Avalon now incorporates a couple of modifiers for a Component
definition that allows you to control the number of Components
in a pool, and how quickly it grows.  This is especially helpful
in Cocoon where the defaults don't always work well.

The magic attributes are "pool-min", "pool-max", and "pool-grow".
The defaults are:

pool-max: 8
pool-min: 2
pool-grow: pool-min  (2)

What this means is that the pool for the default component initially
contains 2 instances, and if demand exceeds that the pool will increase
by two components at a time up to 8 instances.  Beyond that the pool
turns into a factory in that new Component instances are created, but
destroyed when they are returned.  This is a performance issue--but
it does manage the number of instances available at one time.

For components like "event-pipeline" and "sax-connector", I would
advise increasing the pool capacities to values like this:

<event-pipeline pool-max="16" pool-min="8" pool-grow="2"/>
<sax-connector pool-max="32" pool-min="16" pool-grow="4"/>

There are no hard and fast rules.  It is something that is worth
playing around with.  When you find settings that really work for
you, post it on the list.

The default settings work well for testing purposes, but in high
traffic sites, they should be adjusted.  Please note that if
not specified, "pool-grow" always matches "pool-min".  If not specified
"pool-min" always equals "2".  If you specify the minimum being higher
than the maximum, then the maximum will match the minimum, and the pool
will be fully filled on initialization.

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