Tuning network performance for your Linux environment

Before you use real-time runtime metrics collection, ensure that your Linux® environment can handle the data flow from real-time runtime metrics collection.

About this task

You can take the following actions to ensure that network performance on your Linux environment performs optimally.

  • Avoid Domain Name System (DNS) delays. This problem can manifest on z/TPF as a timeout condition on your first message analysis tool collection and potentially succeed on following collections.
  • Avoid overruns on the Linux socket receive buffer. This problem can occur on the z/TPF system in the form of a timeout condition on real-time runtime metrics collection data types.

Procedure

  • To avoid DNS delays, verify that your DNS settings list your preferred local DNS servers before public DNS servers.
    1. View the contents of the file: /etc/resolv.conf
    2. If your preferred local DNS servers are not listed first, modify the contents of the file to list your preferred local DNS servers first and save the file.
  • To prevent Linux socket receive buffer overruns, verify that the current receive buffer allocation of your socket is at least 4 MB or greater.
    • If you use Docker, take any of the following actions:
      • If you want to change the value of the socket buffer temporarily, enter the following command:
        sudo sysctl -w net.core.rmem_max=maxval
        maxval
        The socket buffer value that you want to set, for example, 4136960.
      • If you have permissions to update the sysctl system configuration files, complete the following steps:
        1. Change the value of the socket buffer by entering one of the following commands depending on the kind of system configuration file that you have:
          • sudo echo 'net.core.rmem_max=maxval' > /etc/sysctl.d/filename.conf
            maxval
            The socket buffer value that you want to set, for example, 4136960.
            filename.conf
            The name of the system configuration file, for example, 01-rmem_max.conf.
          • sudo echo 'net.core.rmem_max=maxval' > filename.conf
            maxval
            The socket buffer value that you want to set, for example, 4136960.
            filename.conf
            The name of the system configuration file, for example, 90-override.conf.
        2. Ensure that the system is updated with your change by entering the following command:
          sudo sysctl --system
        3. Verify that the socket buffer value is updated by entering the following command:
          sysctl net.core.rmem_max
          If the value is not updated, take the following action.
      • If the socket buffer value was not updated after taking the previous step and you have limited access to the sysctl system configuration files, complete the following steps:
        1. Move to the directory where the system configuration files are by entering the following command:
          cd /etc/sysctl.d
        2. Take any of the following actions:
          • If a default system configuration file exists, modify the file by using your editing tool.
          • If a default system configuration file does not exist, create a new system configuration file. For example, enter the following command:
            touch filename.conf
            filename.conf
            The name of the system configuration file, for example, 90-override.conf or 01-rmem_max.conf.
        3. Change the value of the socket buffer by taking one of the following actions:
          • Enter the following command:
            sudo echo 'net.core.rmem_max= maxval' > /etc/sysctl.d/filename.conf
            maxval
            The value of the socket buffer that you want to set, for example, 4136960.
            filename.conf
            The name of the system configuration file, for example, 01-rmem_max.conf.
          • Manually edit the configuration file by adding the following line in your configuration file:
            net.core.rmem_max=maxval
            maxval
            The value of the socket buffer that you want to set, for example, 4123456.
        4. Verify that the socket buffer value is updated by entering the following command:
          sysctl net.core.rmem_max
    • If you use another system type that is not Docker, complete the following steps:
      1. Navigate to the directory where the system configuration files are by entering the following command. Ensure that you locate the correct system configuration file that your environment uses.
        cd /etc/sysctl
      2. Edit the system configuration file to update the value of the socket buffer to 4 MB or larger.
      3. Verify that the socket buffer value is updated.
      4. If the socket buffer value is not updated, contact your IT manager regarding allocating resources.