Setting Collection Broker Configuration Information
The Collection Broker must be restarted or stopped and started in order to use any configuration changes that you make. Because query or enqueue requests to a Collection Broker that is stopped will automatically start it, no calls should be made while you are attempting to change the configuration of a Collection Broker instance if you choose to explicitly stop the Collection Broker before making a change. You might find it more efficient to make the change while the Collection Broker is running and then restart the Collection Broker.
The following is an example of retrieving and setting Collection Broker configuration information in C#:
CollectionBrokerStatus cbstat = new CollectionBrokerStatus();
CollectionBrokerStatusResponse statresp = null;
while ((statresp = port.CollectionBrokerStatus(cbstat)) != null
&& statresp.collectionbrokerstatusresponse.status ==
collectionbrokerstatusresponseStatus.stopped)
{
CollectionBrokerSet cbset = new CollectionBrokerSet();
CollectionBrokerSetConfiguration sconfig = new CollectionBrokerSetConfiguration();
cbset.configuration = sconfig;
collectionbrokerconfiguration config = new collectionbrokerconfiguration();
cbset.configuration.collectionbrokerconfiguration = config;
port.CollectionBrokerSet(cbset);
CollectionBrokerStart cbstart = new CollectionBrokerStart();
port.CollectionBrokerStart(cbstart);
}
To change any of the configuration values used by the Collection Broker the next time that it starts, modify the value of the configuration parameters that you want to modify before calling the collection-broker-set function. In the previous code example, you could do that by assigning appropriate values to the appropriate fields in the config object. For example, the following fragment would set the overcommit-factor to .9:
CollectionBrokerSet cbset = new CollectionBrokerSet();
CollectionBrokerSetConfiguration sconfig = new CollectionBrokerSetConfiguration();
cbset.configuration = sconfig;
collectionbrokerconfiguration config = new collectionbrokerconfiguration();
cbset.configuration.collectionbrokerconfiguration = config;
config.overcommit-factor = .90;
port.CollectionBrokerSet(cbset);
This value would cause the Collection Broker to assume that only 90% of the memory that is reported as free is actually allocatable. This would enable the Collection Broker to allocate more memory than it normally would (75% is the usual weight) without causing the machine to swap or page. This can be useful to maximize memory use by the Collection Broker on systems that run few other processes. Using a value higher than 1.0 would enable the Collection Broker to allocate substantially more memory, but would essentially guarantee swapping or paging at some point.