Improving transfer speed of task with library items
search cancel

Improving transfer speed of task with library items

book

Article ID: 320226

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

All operations related to content libraries that involve data transfer, which cannot be conducted by the ESXi hosts in the environment, rely on a service called Transfer Service. Such transfer operations use the secure HTTPS connection by default, although the traffic can also use HTTP connection. Also all these transfers for which the Transfer Service is serving the data or clients are pushing data into it, would go through a proxy component called rhttpproxy.
The rhttpproxy has some limitations and is not performing optimally when the amount of data being streamed is massive, which causes all transfers to slow down over HTTPS connections. Transfers that use non-secure HTTP connection are noticeably faster.

You might observe the different behavior of transfers during the following operations, depending on the connection that you use:
  • synchronizing a library in the following cases:
    • if you store the library contents to your local file system
    • if you store the library contents to NFS storage
    • if the synchronization task is between libraries that belong to vCenter Server instances, which are not in the same SSO domain
    • if there is no connectivity between the ESXi hosts that belong to the vCenter Servers where the content libraries run
  • importing item to a library (upload from your browser)
  • exporting item from a library (download from your browser)


Environment

VMware vSphere ESXi 6.5
VMware vCenter Server 6.0.x
VMware vCenter Server 6.5.x

Resolution

You can improve the transfer speed for tasks you perform with content libraries in two ways:
  • Switch the traffic to run through non-secure HTTP connection. This method improves the transfer speed for synchronization tasks from the cases listed in the Details section.
  • Bypass the rhttpproxy. This method improves the transfer speed for synchronization tasks, importing and exporting items.

Using HTTP protocol to improve transfer speed of synchronization tasks

Synchronization tasks have two stages:
  • Transfer of the metadata of the library item
  • Transfer of the content of a library item
Depending on whether you want to enforce using HTTPS connection only on particular libraries or for all the libraries in your vCenter Server instance, you can use an individual or a global approach to switch the traffic. By using the individual approach on a particular library, you configure the traffic to run though HTTP connection for both stages of the synchronization task. This approach gives you more granular control over individual libraries in your environment. By using the global approach, you keep the transfer of metadata over HTTPS connection, and only the transfer of the content of the library items is using an HTTP connection. Because the content of the library items is larger in size than the metadata, the overall improve of the transfer speed is approximately the same for the individual and the global approach.
 

Enforcing the use of HTTP connection for all the libraries in your environment (Global approach)

  1. In the vSphere Web Client, navigate to Administration > Deployment > System Configuration > Services > Content Library Service.
  2. Click the Manage tab.
  3. Select Force HTTP for Library Sync, and click Edit.
  4. Click the drop-down menu next to Force HTTP for Library Sync, and select true.
  5. Click OK.
 

Enforcing the use of HTTP protocol for synchronization tasks on individual libraries (Individual approach)

  1. In the vSphere Web Client, navigate to a library.
  2. Right-click the subscribed library, and select Edit Settings.
  3. Edit the URL of the subscribed library to start with http, instead of https.
The format changes from https://$host/... to http://$host/...Note: The speed performance gains for either of the approaches highly depend on the actual network speed and CPU model of your host.
 

Bypassing rhttpproxy to improve transfer speed of operations with library items

Another approach to improve transfer speeds of the operations you perform on content library items is to bypass rhttpproxy. Bypassing the rhttpproxy results in all transfers from the types listed in the Details section to start going through HTTP connection. Since rhttpproxy usually provides SSL termination for Transfer Service, only the insecure HTTP connection is proxy bypassed.
This approach improves the transfer speeds for all types of library items related tasks that involve transfer of data. These are the synchronization tasks that are listed in the Details section, import and export of library items. However, this approach does not provide granular control because it requires direct modifications on the host system where vCenter Server runs.

If you are using the vCenter Server Appliance, perform the following tasks:
  1. Start a session of vCenter Server Appliance using a SSH console.
  2. Log in as a user who has the administrator or super administrator role.
    The default user with a super administrator role is root.
  3. To open the appliance firewall, run the following command:
    iptables -I INPUT -p tcp --dport 16666 -j ACCEPT
  4. At the command prompt, navigate to the vdc.properties file and modify it by running the following commands:
    echo "" >> /etc/vmware-content-library/vdc.properties
    echo "# Modified base url to bypass rhttpproxy for performance" >> /etc/vmware-content-library/vdc.properties
    echo "transfersvc.base.url=http://$host:16666/cls/" >> /etc/vmware-content-library/vdc.properties

    $host stands for the IP address or the host name of the vCenter Server Appliance.
  5. Restart the Content Library service:
    service-control --stop vmware-content-library
    service-control --start vmware-content-library
If you are using a vCenter Server instance that runs on Windows, perform the following tasks:
  1. Log in as an administrator on the Windows machine where vCenter Server is installed.
  2. In the Windows firewall, open port 16666 to enable inbound TCP connections. For more information, see the Windows documentation.
  3. Navigate to the vdc.properties file and open it in a text editor.
    The default location of the file is C:\ProgramData\VMware\vCenterServer\cfg\content-library\vdc.properties.
  4. Add the following configuration lines to the vdc.properties file, and save it.
    # Modified base url to bypass rhttpproxy for performance
    transfersvc.base.url=http://$host:16666/cls/

    $host stands for the IP address or the host name of the host that runs vCenter Server.
  5. Open the server file at C:\Program Files\VMware\vCenter Server\content-library\server\conf\server.xml.
    • To use IPv4 address externally, find the Connector element with the address attribute address="127.0.0.1". Copy that Connector element and add it as a connector. Update the new connector's address attribute to address="<external-IPv4-ip>".
    • To use the IPv6 address externally, find the Connector elements with the address attribute address="::1". Copy that Connector element and add it as a connector. Update the new connector's address attribute to a<external-ipv6-ip>ddress="<external-IPv6-ip>"</external-ipv6-ip>.
  6. In the vSphere Web Client, navigate to Administration > System Configuration > Services > Content Library Service and click Restart to restart the Content Library service.
Note: This article is applicable for only 6.5.

Additional Information

For translated versions of this article, see: