Ephemeral Ports Test

An ephemeral (short-lived) port is a transport protocol port for Internet Protocol (IP) communications allocated automatically from a predefined range by the TCP/IP stack software. It is used by the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or the Stream Control Transmission Protocol (SCTP) as the port assignment for the client end of a client–server communication to a well known port on a server. Ephemeral ports may also be used to free up a well-known service listening port and establish a service connection to the client host. The allocations are temporary and only valid for the duration of the communication session. After completion of the communication session, the ports become available for reuse.

This test monitors the usage of ephemeral ports, and reports whether adequate ports are available for use. With the help of this test, you can proactively detect over-utilization of ports and promptly prevent port exhaustion.

This test is disabled by default. To enable the test, go to the enable / disable tests page using the menu sequence : Agents -> Tests -> Enable/Disable, pick the desired Component type, set Performance as the Test type, choose the test from the disabled tests list, and click on the << button to move the test to the ENABLED TESTS list. Finally, click the Update button.

Target of the test : A host system

Agent deploying the test : An internal agent

Outputs of the test : One set of results for each host system monitored

Parameter Description

Test Period

How often should the test be executed

Host

The host for which the test is to be configured.

Port

The port at which the specified host listens

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Ephemeral ports in use:

Indicate the number of ephemeral ports that are currently in use.

Number

 

Ephemeral ports available:

Indicates the total number of ports in the TCP/IP stack's predefined range of ports - i.e., in the pool of ephemeral ports.

Number

 

Free ephemeral ports:

Indicates the number of ports that are available for use.

Number

The value of this measure is the difference between the Total ports and the Ports in Use measures. A port is considered free when its yet to be assigned to a client, or was assigned and later released for re-use when the client connection terminated.

A value 0 for this measure is something to be concerned about, particularly, on Windows systems. On Windows systems, if all the available ephemeral ports are allocated to client applications then the client experiences a condition known as TCP/IP port exhaustion. When TCP/IP port exhaustion occurs, client port reservations cannot be made and errors will occur in client applications that attempt to connect to a server via TCP/IP sockets. To avoid port exahustion and support high connection rates, reduce the TIME_WAIT value and increase the port range.

Note:

Port exhaustion may not occur on Unix systems due to the higher default connection rate in those operating systems.

Ephemeral port usage:

Indicates the percentage of ephemeral ports that are in use.

Percent

A high value could indicate that many clients are connecting to the system without explicitly requesting for a specific port number. It could also mean that many ephemeral ports have not been released even after the clients terminated their connections.

A value close to 100% could be a cause for concern, particularly on Windows systems. This is because, on Windows, if all the available ephemeral ports are allocated to client applications then the client experiences a condition known as TCP/IP port exhaustion. When TCP/IP port exhaustion occurs, client port reservations cannot be made and errors will occur in client applications that attempt to connect to a server via TCP/IP sockets. To avoid port exahustion and support high connection rates, reduce the TIME_WAIT value and increase the port range.

Note:

Port exhaustion may not occur on Unix systems due to the higher default connection rate in those operating systems.