Multiplexed connections and CPU utilization
Many traditional nonthreaded SQL client applications use multiple database connections to perform work for a single user. Each database connection establishes a separate network connection to the database server. The multiplexed connection facility provides the ability for one network connection in the database server to handle multiple database connections from a client application.
Multiplexed connections enable the database server to create multiple database connections without consuming the additional computer resources that are required for additional network connections.
When a nonthreaded client uses a multiplexed connection, the database server still creates the same number of user sessions and user threads as with a nonmultiplexed connection. However, the number of network connections decreases when you use multiplexed connections. Instead, the database server uses a multiplex listener thread to allow the multiple database connections to share the same network connection.
- The decrease in total number of network connections and the resulting
decrease in system CPU time
The usual cause for a large amount of system CPU time is the processing of system calls for the network connection. Therefore, the maximum decrease in system CPU time is proportional to the decrease in the total number of network connections.
- The ratio of this decrease in system CPU time to the user CPU
time
If the queries are simple and use little user CPU time, you might experience a sizable reduction in response time when you use a multiplexed connection. But if the queries are complex and use a large amount of user CPU time, you might not experience a performance improvement.
To get an idea of the amounts of system CPU time and user CPU times per virtual processor, use the onstat -g glo option.
- Define an alias using the DBSERVERALIASES configuration
parameter. For example, specify:
DBSERVERALIASES ids_mux
- Add an SQLHOSTS entry for the alias using
sqlmux
as the nettype entry, which is the second column in the SQLHOSTS file. For example, specify:ids_mux onsqlmux ......
The other fields in this entry, the hostname and servicename, must be present, but they are ignored.
- Enable multiplexing for the selected connection types by specifying
m=1
in the sqlhosts file or registry that the client uses for the database server connection. - On Windows™ platforms, you must also set the IFX_SESSION_MUX environment variable.