Docker Images - Performance Test

A Docker server can have multiple images using which containers are created. In large environments where the requirements of users vary from minute to minute, it is important for an administrator to cater to their specific needs by providing the images of their choice so that the users can create the containers and load applications accordingly. Often administrators may be confused while identifying the needs of the users. An image that is needed today may not be needed tomorrow to create a container. In such cases, the images may be unutilized but still hold on valuable disk space. To optimize the disk space and eliminate unused images, administrators are required to analyze the performance of the images as well as identify the images that are most commonly used by the users. The Docker Images – Performance test helps administrators in this regard!

This test monitors the images of the Docker server and reports the number of containers created using each image. By analyzing the number of running containers created from each image and the resource utilization of those containers, administrators can figure out the image that is widely used by the users to create the containers and analyze how well the resources are utilized by those containers.

Note:

This test will run and report metrics, only if the following pre-requisites are fulfilled:

  • The Docker server should be of v1.5 or above.
  • Remote REST API should be enabled on the Docker host. To know how to enable remote API, follow the procedure discussed in How does eG Enterprise Monitor Docker?
  • The eG agent should be 'allowed' to make remote REST API calls to pull metrics. For this purpose, make sure you configure this test with the credentials of a user who has permissions to connect to remote REST API and invoke its methods.
  • Make sure that the WEBPORT parameter of this test is configured with port on which remote REST API has been enabled.

Target of the test : A Docker server

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for each image available on the target Docker server that is being monitored.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed.

Host

The IP address of the host for which this test is to be configured.

Port

The port number at which the specified HOST listens. The default is 2375.

UseSUDO

This flag is not applicable to this test.

Docker User and Docker Password

Specify the credentials of the user who is authorized to access remote REST API and invoke its methods for metrics collection.

Confirm Password

Confirm the Password by retyping it here.

Webport

By default, the remote REST API is enabled on port 2375. This implies that by default, this test connects to port 2375 to access the remote REST API and make API calls for metrics collection. In some environments however, the remote REST API can be enabled on a different port. To know how to enable the remote REST API on a different port, follow the procedure discussed in How does eG Enterprise Monitor Docker?

Make sure you configure this parameter with the exact port on which the remote REST API has been enabled. To know which port number that is, do the following:

  • Open the /lib/system/system/docker.service file on the Docker host.
  • In the file, find the line which starts with ExecStart. In that line, look for the following entry:

    -H=tcp://0.0.0.0:<Remote_API_Port>

    The number that appears after ':' in the entry above, is the remote REST API port.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enabled/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Total containers

Indicates the total number of containers that were mapped to this image.

Number

The detailed diagnosis of this measure if enabled, lists the name of the containers.

Compare the value of this measure across the images to identify the image to which maximum number of containers are mapped.

Running containers

Indicates the number of containers that are created from this image and are currently in Running state.

Number

Ideally, the value of this measure should be high. A low value for this measure is a cause of concern. The detailed diagnosis of this measure if enabled, lists the containers that are currently in Running state and the resource utilization of the containers.

CPU utilization of containers

Indicates the percentage of CPU utilized by the containers (created from this image) that are currently in Running state.

Percent

This measure is only applicable for the Docker server 1.5 and above. A sudden increase or decrease in the value of this measure could be a cause of concern.

Memory used by containers

Indicates the amount of memory utilized by the containers (created from this image) that are currently in Running state.

MB

This measure is only applicable for Docker server 1.5 and above. A low value is desired for this measure. A high value of this measure indicates that the Docker is running out of space.

Memory utilization of containers

Indicates the percentage of memory utilized by the containers (created from this image) that are currently in Running state.

Percent

This measure is only applicable for the Docker server 1.5 and above. A value close to 100% indicates that the memory is running out of space.

Disk space used by image

Indicates the amount of disk space utilized by this image.

MB

Ideally, the value of this measure should be low. A significant increase in the value of this measure could be a cause of concern.

The detailed diagnosis of the Total containers measure lists the containers that were mapped to an image.

Figure 1 : The detailed diagnosis of the Total containers measure

The detailed diagnosis of the Running containers lists the containers that are currently running and the split up resource utilization (CPU, memory and memory usage) for each of the listed containers.

Figure 2 : The detailed diagnosis of the Running containers measure