|Oracle® Traffic Director Administrator's Guide
11g Release 1 (22.214.171.124.0)
Part Number E21036-04
|PDF · Mobi · ePub|
This section contains the following topics:
HTTP 1.0 and HTTP 1.1 support sending multiple requests over a single HTTP connection. This capability, which was called keep alive in HTTP 1.0, is called persistent connections in HTTP 1.1 and is enabled by default in Oracle Traffic Director.
Keeping a connection active even after processing the original request helps reduce the time and overhead associated with creating and closing TCP connections for future similar requests. However, keep-alive connections over which few or no requests are received are an unnecessary burden on the system.
Figure 15-2 depicts the connection handling process when keep-alive is enabled.
To avoid this problem, you can specify the maximum number of waiting keep-alive connections. When a keep-alive request is received, if there are more open connections waiting for requests than the specified maximum number, the oldest connection is closed. In addition, you can specify the period after which inactive keep-alive connections should be closed.
perfdump report shows the current keep-alive settings and metrics, as shown in the following example:
KeepAliveInfo: -------------------- KeepAliveCount 26/60000 KeepAliveHits 154574634 KeepAliveFlushes 0 KeepAliveRefusals 0 KeepAliveTimeouts 5921 KeepAliveTimeout 120 seconds
KeepAliveInfo section of the
perdump report shows the following:
The first number is the number of connections in keep-alive mode.
The second number is the maximum number of keep-alive connections allowed.
KeepAliveHits is the number of times a request was successfully received over a connection that was kept alive.
KeepAliveHits is high when compared with
KeepAliveFlushes, it indicates that the keep-alive connections are being utilized well.
KeepAliveHits is low, it indicates that a large number of keep-alive connections remain idle, unnecessarily consuming system resources. To address this situation, you can do the following:
Decrease the maximum number of keep-alive connections so that fewer connections are kept alive.
Note that the number of connections specified by the maximum connections setting is divided equally among the keep-alive threads. If the maximum connections setting is not equally divisible by the keep-alive threads setting, the server might allow slightly more than the maximum number of keep-alive connections.
KeepAliveTimeout so that keep-alive connections do not remain idle for long. Note that if the
KeepAliveTimeout is very low, the overhead of setting up new TCP connections increases.
KeepAliveFlushes is the number of times the server closed connections that the client requested to be kept alive.
To reduce keep-alive flushes, increase the keep-alive maximum connections.
On UNIX/Linux systems, if the keep-alive maximum connections setting is too high, the server can run out of open file descriptors. Typically, 1024 is the limit for open files on UNIX/Linux; so increasing the keep-alive maximum connections above 500 is not recommended. Alternatively, you can increase the file descriptor limit, as described in Section 15.2, "Tuning the File Descriptor Limit."
KeepAliveRefusals is the number of times the server could not hand off a connection to a keep-alive thread, possibly because the
KeepAliveCount exceeded the keep-alive maximum connections. If this value is high, consider increasing the maximum number of keep-alive connections.
KeepAliveTimeouts is the number of times idle keep-alive connections were closed because no requests were received over them during the last
KeepAliveTimeout is the duration, in seconds, after which idle keep-alive connections are closed.
Another parameter that is configurable and affects performance, but is not shown in the
perfdump report is the keep-alive poll interval, which, together with
KeepAliveTimeout, controls latency and throughput. Decreasing the poll interval and the timeout period reduces latency on lightly loaded systems. Increasing the values of these settings raises the aggregate throughput on heavily loaded systems. However, if there is too much latency and too few clients, the aggregate throughput suffers, because the server remains idle unnecessarily. Therefore, at a given load, if there is idle CPU time, decrease the poll interval; if there is no idle CPU time, increase the poll interval.
You can tune the keep-alive settings by using either the administration console or the CLI.
To change the keep-alive settings by using the administration console, do the following:
Log in to the administration console, as described in Section 2.3.2, "Accessing the Administration Console."
Click the Configurations button that is situated at the upper left corner of the page.
A list of the available configurations is displayed.
Select the configuration that you want to modify.
In the navigation pane, expand Advanced Settings and select HTTP.
The HTTP Settings page is displayed.
Go to the Keep Alive section on the page.
Specify the parameters that you want to change.
On-screen help and prompts are provided for all of the parameters.
When you change the value in a field or tab out of a text field that you changed, the Save button near the upper right corner of the page is enabled.
At any time, you can discard the changes by clicking the Reset button.
After making the required changes, click Save.
A message, confirming that the updated configuration was saved, is displayed in the Console Messages pane.
In addition, the Deployment Pending message is displayed at the top of the main pane. You can either deploy the updated configuration immediately by clicking Deploy Changes, or you can do so later after making further changes as described in Section 4.3, "Deploying a Configuration."
To view the current the keep-alive settings, run the
get-keep-alive-prop command, as shown in the following example:
tadm> get-keep-alive-prop --config=soa enabled=true threads=20 max-connections=2000 poll-interval=0.002 timeout=31
To change the keep-alive settings, run the
For example to change the maximum number of keep-alive connections, run the following command:
tadm> set-keep-alive-prop --config=soa max-connections=2000OTD-70201 Command 'set-keep-alive-prop' ran successfully.
For the updated configuration to take effect, deploy it to the Oracle Traffic Director instances by using the
For more information about the CLI commands mentioned in this section, see the Oracle Traffic Director Command-Line Reference or run the commands with the