The Oracle Waveset Gateway generates a thread for each connection, and uses a different pool for each unique combination of resource type, Gateway host, and Gateway port. The Gateway checks for idle connections every five minutes. When a connection has been idle for 60 seconds, the Gateway closes and removes that connection from the pool.
When the Gateway receives a request, it does the following:
If there are no idle connections in the corresponding pool, the Gateway creates a new connection.
If an idle connection exists in the pool, the Gateway retrieves and reuses that connection.
You must configure the maximum number of connections on the resource, and you must configure these connections the same way for all resources of the same type, that are using the same Gateway. For that resource type, the first connection made to the Gateway on a given host and port uses that resource’s maximum connections value.
When you change the maximum number of connections on a resource, you must start and stop the server for the change to take effect.
The following example shows how connections, requests, and Gateway threads are related.
If you set the maximum number of connections to 10 on an Active Directory resource, and you are using two Waveset servers, then you can have up to 20 simultaneous connections (10 from each Waveset server) to the Gateway for that Active Directory resource. The Gateway can have 10 simultaneous requests outstanding from each server, and the Gateway processes each request on a different thread. When the number of simultaneous requests exceeds the maximum number of Gateway connections, additional requests are queued until the Gateway completes a request and returns the connection to the pool.
Although the Gateway code is multi-threaded, this characteristic does not address the APIs or services being used by the Gateway. For Active Directory, the Gateway uses the ADSI interface provided by Microsoft. No investigation has been done to determine whether this interface handles Gateway requests in parallel.
Other methods for improving Gateway performance, include:
Locating the Gateway near (from a network connectivity perspective) the domain controllers of the managed domain
Increasing the block size on a Gateway resource can increase throughput during reconciliation or load operations
Increased throughput results have been noted for basic reconciliations with no custom workflows and in which no attribute reconciliations are being performed. Initially, the Gateway does consume more system memory, but this memory is eventually released.
Be aware that there is a diminishing return. At some point, larger block sizes do not result in proportionately increased performance. For example, the following data shows the speed observed for a Load from Resource of 10,000 users from an Active Directory resource. Also, the peak memory usage for the Gateway process during the load is included.
Block Setting |
Users Created Per Hour |
Peak Gateway Memory Usage |
---|---|---|
100 |
500 |
20 MB |
200 |
250 |
25 MB |
500 |
9690 |
60 MB |
1000 |
10044 |
92 MB |
For Exchange Server 2007, the PowerShellExecutor performs actions for Exchange Server 2007. You can modify the following registry settings to change the behavior of the PowerShellExecutor inside the Gateway.
Both settings can have a large impact on the behavior and memory usage of the Gateway. Changes to these parameters should only be considered after careful testing.
powerShellTimeout
Content. Timeout for PowerShell actions (registry type REG_DWORD)
Default. 60000 ms (1 minute)
When the powerShellTimeout setting times out, any RunSpace actions are interrupted and canceled to prevent runaway actions in the PowerShell environment that cause the Gateway to become unresponsive.
Decreasing the powerShellTimeout value to a small value can prematurely cancel actions, and can prevent the RunSpace initialization from finishing correctly. Observed startup times for the first RunSpace in the pool range from 2—5 seconds.
The powerShellTimeout value is read-only on startup, and you cannot change it without restarting the gateway.
runSpacePoolSize
Content. Number of RunSpaces in the pool (registry type REG_DWORD)
Default. 5
Minimum. 5
Maximum. 25
The number of RunSpaces in the pool allow for parallel execution of PowerShell actions by the gateway. One provisioning action or update of a user in Exchange 2007 can result in multiple PowerShell actions being executed.
A started RunSpace can consume a large amount of memory. For the first RunSpace, the typical size is approximately 40 MB. Subsequent RunSpaces normally use between 10—20 MB.
The preceding figures can differ in specific environments and are only given as guidelines, so be careful when changing this value.
The runSpacePoolSize value is read-only on startup, and you cannot change the pool size value without restarting the Gateway.