BEA WebLogic Server Tuning Guide
16
While it is not recommended, the number of native socket readers can also be throttled. Specify the system property
–Dweblogic.PosixSocketReaders=<n> where <n> is the number of socket readers desired. The default is three (3),
which is ideal for most configurations.
While the Java multiplexer is not recommended in the 8.1 SP3 release (and will perform poorly), it can be used. To
use the Java socket multiplexer, explicitly disable the native socket multiplexer (by setting the system property -
Dweblogic.NativeIOEnabled =false). When the Java socket multiplexer is used, use the following scheme to
calculate the Execute Queue Thread Count for each server taking part in a cluster configuration:
1. Determine the number of servers in the cluster.
2. Determine the average number of clients that will connect to the cluster.
3. If session replication is configured (for HTTP sessions and Stateful session beans), add the values obtained
in Steps 1 and 2. Otherwise, carry forward the value in Step 2.
4. Add 2 to the value obtained in Step 3. This is the average number of sockets that will be open on the server
at any time.
5. Calculate the minimum of the value obtained from Step 4 and add 50. This is the number of socket readers
to configure.
11
6. Calculate the number of worker threads. This is the maximum of the value in Step 2 and 25 (the
recommended minimum number of worker threads is 25).
7. Add the results of Steps 5 and 6, plus the overhead of 5 execute threads. That is the execute thread count.
8. Calculate (Step 5 * 100) / Step 7. This is the percentage of socket readers.
For example, assume a cluster with four servers and an average of 50 client connections with no session replication
configured:
Step 1: 4
Step 2: 50
Step 3: 50
Step 4: 50+2 = 52
Step 5: Min(50,52) = 50
Step 6: maximum (50, 25) = 50
Step 7: 50+50+5 = 105
Step 7: (50*100) / 105 = 48 (rounded up).
This example requires 105 threads with 48 percent socket readers. This also means to allow a maximum of 103
execute threads (discounting two for the admin server connection and multicast handling) executing simultaneously
in the server.
WebLogic Server also provides monitoring of all the active queues (including the default execute queue) using the
WebLogic Server console. The Server->Monitor->All Active Queues->(Specific queue, particularly the default queue),
Sockets and Connections can be used to identify the number of socket reader threads, the amount of work through
them, and the number of worker threads and idle threads in a queue. The throughput information for each thread is
also provided.
3.10 Configuring Socket Reader Parameters
The WebLogic Server 8.1 SP3 for NonStop server has native code for the socket multiplexer, which means the
WebLogic Server will not use its timeout-based polling mechanism as described in the overview section. If native
multiplexer is disabled for some reason, WebLogic Server uses a scheme similar to the following for arriving at the
polling timeout for each socket (specified in milliseconds).
11
While we have specified a maximum value of 50 for the number of socket readers, it is recommended that the number of socket readers be determined by the
target application. Note that increasing the number of socket readers to match the number of open sockets will start providing lower throughput while extracting
higher processor time consumption. A value of 50 seems to be a logical starting point, but this value has to be individually ascertained for each application.










